From 243c25007f3884e32d7fca24b8f6000e52d0033d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Wed, 16 Oct 2024 04:09:04 +0200 Subject: [PATCH 01/14] musl: Update the list of architectures with time32 compat helpers. --- src/musl.zig | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/musl.zig b/src/musl.zig index 975929a59d..075d8e1184 100644 --- a/src/musl.zig +++ b/src/musl.zig @@ -123,7 +123,17 @@ pub fn buildCrtFile(comp: *Compilation, in_crt_file: CrtFile, prog_node: std.Pro try addSrcFile(arena, &source_table, src_file); } - const time32_compat_arch_list = [_][]const u8{ "arm", "i386", "mips", "powerpc", "m68k" }; + const time32_compat_arch_list = [_][]const u8{ + "arm", + "i386", + "m68k", + "microblaze", + "mips", + "mipsn32", + "or1k", + "powerpc", + "sh", + }; for (time32_compat_arch_list) |time32_compat_arch| { if (mem.eql(u8, arch_name, time32_compat_arch)) { for (compat_time32_files) |compat_time32_file| { From 533d8ea771a307a33d1e6f93d819d808f9c27597 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Wed, 16 Oct 2024 04:09:41 +0200 Subject: [PATCH 02/14] musl: Fix needsCrtiCrtn() for m68k. --- src/musl.zig | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/musl.zig b/src/musl.zig index 075d8e1184..fbf0367651 100644 --- a/src/musl.zig +++ b/src/musl.zig @@ -306,8 +306,13 @@ pub fn buildCrtFile(comp: *Compilation, in_crt_file: CrtFile, prog_node: std.Pro /// See lib/libc/musl/crt/ARCH/crt?.s . pub fn needsCrtiCrtn(target: std.Target) bool { return switch (target.cpu.arch) { - .riscv32, .riscv64, .wasm32, .wasm64 => false, - .loongarch64 => false, + .loongarch64, + .m68k, + .riscv32, + .riscv64, + .wasm32, + .wasm64, + => false, else => true, }; } From 8045268698bb46e954c886b913fe216c59f5824e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Wed, 16 Oct 2024 04:12:41 +0200 Subject: [PATCH 03/14] std.zig.target: Update musl path helpers to support alternative ABIs. This is needed for muslx32 and muslabin32 support. --- lib/std/zig/LibCDirs.zig | 15 ++++------- lib/std/zig/target.zig | 54 ++++++++++++++++++++++++---------------- src/musl.zig | 17 +++++++------ 3 files changed, 46 insertions(+), 40 deletions(-) diff --git a/lib/std/zig/LibCDirs.zig b/lib/std/zig/LibCDirs.zig index 8b8a3a8d42..536ef7ab71 100644 --- a/lib/std/zig/LibCDirs.zig +++ b/lib/std/zig/LibCDirs.zig @@ -167,21 +167,16 @@ pub fn detectFromBuilding( } const generic_name = libCGenericName(target); - // Some architectures are handled by the same set of headers. + // Some architecture families are handled by the same set of headers. const arch_name = if (target.abi.isMusl()) std.zig.target.muslArchNameHeaders(target.cpu.arch) - else if (target.cpu.arch.isThumb()) - // ARM headers are valid for Thumb too. - switch (target.cpu.arch) { - .thumb => "arm", - .thumbeb => "armeb", - else => unreachable, - } else @tagName(target.cpu.arch); const os_name = @tagName(target.os.tag); - // Musl's headers are ABI-agnostic and so they all have the "musl" ABI name. - const abi_name = if (target.abi.isMusl()) "musl" else @tagName(target.abi); + const abi_name = if (target.abi.isMusl()) + std.zig.target.muslAbiNameHeaders(target.abi) + else + @tagName(target.abi); const arch_include_dir = try std.fmt.allocPrint( arena, "{s}" ++ s ++ "libc" ++ s ++ "include" ++ s ++ "{s}-{s}-{s}", diff --git a/lib/std/zig/target.zig b/lib/std/zig/target.zig index 6db17c1f71..46ac895dcd 100644 --- a/lib/std/zig/target.zig +++ b/lib/std/zig/target.zig @@ -97,31 +97,41 @@ pub fn canBuildLibC(target: std.Target) bool { return false; } -pub fn muslArchNameHeaders(arch: std.Target.Cpu.Arch) [:0]const u8 { - return switch (arch) { - .x86 => return "x86", - else => muslArchName(arch), +pub fn muslArchName(arch: std.Target.Cpu.Arch, abi: std.Target.Abi) [:0]const u8 { + return switch (abi) { + .muslx32 => "x32", + else => switch (arch) { + .arm, .armeb, .thumb, .thumbeb => "arm", + .aarch64, .aarch64_be => "aarch64", + .loongarch64 => "loongarch64", + .m68k => "m68k", + .mips, .mipsel => "mips", + .mips64el, .mips64 => "mips64", + .powerpc => "powerpc", + .powerpc64, .powerpc64le => "powerpc64", + .riscv32 => "riscv32", + .riscv64 => "riscv64", + .s390x => "s390x", + .wasm32, .wasm64 => "wasm", + .x86 => "i386", + .x86_64 => "x86_64", + else => unreachable, + }, }; } -pub fn muslArchName(arch: std.Target.Cpu.Arch) [:0]const u8 { - switch (arch) { - .aarch64, .aarch64_be => return "aarch64", - .arm, .armeb, .thumb, .thumbeb => return "arm", - .x86 => return "i386", - .loongarch64 => return "loongarch64", - .m68k => return "m68k", - .mips, .mipsel => return "mips", - .mips64el, .mips64 => return "mips64", - .powerpc => return "powerpc", - .powerpc64, .powerpc64le => return "powerpc64", - .riscv32 => return "riscv32", - .riscv64 => return "riscv64", - .s390x => return "s390x", - .wasm32, .wasm64 => return "wasm", - .x86_64 => return "x86_64", - else => unreachable, - } +pub fn muslArchNameHeaders(arch: std.Target.Cpu.Arch) [:0]const u8 { + return switch (arch) { + .x86 => "x86", + else => muslArchName(arch, .musl), + }; +} + +pub fn muslAbiNameHeaders(abi: std.Target.Abi) [:0]const u8 { + return switch (abi) { + .muslx32 => "muslx32", + else => "musl", + }; } pub fn isLibCLibName(target: std.Target, name: []const u8) bool { diff --git a/src/musl.zig b/src/musl.zig index fbf0367651..d6e29ab6a7 100644 --- a/src/musl.zig +++ b/src/musl.zig @@ -4,7 +4,6 @@ const mem = std.mem; const path = std.fs.path; const assert = std.debug.assert; const Module = @import("Package/Module.zig"); -const archName = std.zig.target.muslArchName; const Compilation = @import("Compilation.zig"); const build_options = @import("build_options"); @@ -113,7 +112,7 @@ pub fn buildCrtFile(comp: *Compilation, in_crt_file: CrtFile, prog_node: std.Pro // When there is a src//foo.* then it should substitute for src/foo.* // Even a .s file can substitute for a .c file. const target = comp.getTarget(); - const arch_name = archName(target.cpu.arch); + const arch_name = std.zig.target.muslArchName(target.cpu.arch, target.abi); var source_table = std.StringArrayHashMap(Ext).init(comp.gpa); defer source_table.deinit(); @@ -162,7 +161,7 @@ pub fn buildCrtFile(comp: *Compilation, in_crt_file: CrtFile, prog_node: std.Pro var is_arch_specific = false; // Architecture-specific implementations are under a / folder. - if (isMuslArchName(dirbasename)) { + if (isArchName(dirbasename)) { if (!mem.eql(u8, dirbasename, arch_name)) continue; // Not the architecture we're compiling for. is_arch_specific = true; @@ -327,7 +326,7 @@ pub fn needsCrt0(output_mode: std.builtin.OutputMode, link_mode: std.builtin.Lin }; } -fn isMuslArchName(name: []const u8) bool { +fn isArchName(name: []const u8) bool { const musl_arch_names = [_][]const u8{ "aarch64", "arm", @@ -401,10 +400,12 @@ fn addCcArgs( want_O3: bool, ) error{OutOfMemory}!void { const target = comp.getTarget(); - const arch_name = archName(target.cpu.arch); + const arch_name = std.zig.target.muslArchName(target.cpu.arch, target.abi); const os_name = @tagName(target.os.tag); - const triple = try std.fmt.allocPrint(arena, "{s}-{s}-musl", .{ - std.zig.target.muslArchNameHeaders(target.cpu.arch), os_name, + const triple = try std.fmt.allocPrint(arena, "{s}-{s}-{s}", .{ + std.zig.target.muslArchNameHeaders(target.cpu.arch), + os_name, + std.zig.target.muslAbiNameHeaders(target.abi), }); const o_arg = if (want_O3) "-O3" else "-Os"; @@ -460,7 +461,7 @@ fn addCcArgs( fn start_asm_path(comp: *Compilation, arena: Allocator, basename: []const u8) ![]const u8 { const target = comp.getTarget(); return comp.zig_lib_directory.join(arena, &[_][]const u8{ - "libc", "musl", "crt", archName(target.cpu.arch), basename, + "libc", "musl", "crt", std.zig.target.muslArchName(target.cpu.arch, target.abi), basename, }); } From 270fbbcd86b02fcd02ad9b818d9de39dfe671754 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Wed, 16 Oct 2024 04:36:40 +0200 Subject: [PATCH 04/14] std.Target: Add muslabin32 and muslabi64 tags to Abi. Once we upgrade to LLVM 20, these should be lowered verbatim rather than to simply musl. Similarly, the special case in llvmMachineAbi() should go away. --- lib/compiler/aro/aro/target.zig | 17 ++++++++++++++--- lib/std/Target.zig | 28 ++++++++++++++++++++++------ lib/std/os/linux.zig | 12 ++++++------ lib/std/zig/LibCDirs.zig | 2 ++ lib/std/zig/system.zig | 16 ++++++++-------- lib/std/zig/target.zig | 2 ++ src/codegen/llvm.zig | 2 ++ src/link/Elf.zig | 8 ++++---- src/target.zig | 10 ++++++++++ test/llvm_targets.zig | 4 ++++ 10 files changed, 74 insertions(+), 27 deletions(-) diff --git a/lib/compiler/aro/aro/target.zig b/lib/compiler/aro/aro/target.zig index 0768e781eb..5e5a793632 100644 --- a/lib/compiler/aro/aro/target.zig +++ b/lib/compiler/aro/aro/target.zig @@ -437,9 +437,18 @@ pub fn ldEmulationOption(target: std.Target, arm_endianness: ?std.builtin.Endian .loongarch64 => "elf64loongarch", .mips => "elf32btsmip", .mipsel => "elf32ltsmip", - .mips64 => if (target.abi == .gnuabin32) "elf32btsmipn32" else "elf64btsmip", - .mips64el => if (target.abi == .gnuabin32) "elf32ltsmipn32" else "elf64ltsmip", - .x86_64 => if (target.abi == .gnux32 or target.abi == .muslx32) "elf32_x86_64" else "elf_x86_64", + .mips64 => switch (target.abi) { + .gnuabin32, .muslabin32 => "elf32btsmipn32", + else => "elf64btsmip", + }, + .mips64el => switch (target.abi) { + .gnuabin32, .muslabin32 => "elf32ltsmipn32", + else => "elf64ltsmip", + }, + .x86_64 => switch (target.abi) { + .gnux32, .muslx32 => "elf32_x86_64", + else => "elf_x86_64", + }, .ve => "elf64ve", .csky => "cskyelf_linux", else => null, @@ -691,6 +700,8 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 { .android => "android", .androideabi => "androideabi", .musl => "musl", + .muslabin32 => "muslabin32", + .muslabi64 => "muslabi64", .musleabi => "musleabi", .musleabihf => "musleabihf", .muslx32 => "muslx32", diff --git a/lib/std/Target.zig b/lib/std/Target.zig index 4610d11c01..6d95533b33 100644 --- a/lib/std/Target.zig +++ b/lib/std/Target.zig @@ -761,6 +761,8 @@ pub const Abi = enum { android, androideabi, musl, + muslabin32, + muslabi64, musleabi, musleabihf, muslx32, @@ -931,6 +933,8 @@ pub const Abi = enum { pub inline fn isMusl(abi: Abi) bool { return switch (abi) { .musl, + .muslabin32, + .muslabi64, .musleabi, .musleabihf, .muslx32, @@ -2287,9 +2291,9 @@ pub const DynamicLinker = struct { .mips64, .mips64el, => |arch| initFmt("/lib/ld-musl-mips{s}{s}{s}.so.1", .{ - // TODO: `n32` ABI support in LLVM 20. switch (abi) { - .musl => "64", + .muslabi64 => "64", + .muslabin32 => "n32", else => return none, }, if (mips.featureSetHas(cpu.features, .mips64r6)) "r6" else "", @@ -2584,8 +2588,8 @@ pub fn standardDynamicLinkerPath(target: Target) DynamicLinker { pub fn ptrBitWidth_cpu_abi(cpu: Cpu, abi: Abi) u16 { switch (abi) { - .gnux32, .muslx32, .gnuabin32, .gnuilp32, .ilp32 => return 32, - .gnuabi64 => return 64, + .gnux32, .muslx32, .gnuabin32, .muslabin32, .gnuilp32, .ilp32 => return 32, + .gnuabi64, .muslabi64 => return 64, else => {}, } return switch (cpu.arch) { @@ -2788,7 +2792,10 @@ pub fn cTypeBitSize(target: Target, c_type: CType) u16 { .char => return 8, .short, .ushort => return 16, .int, .uint, .float => return 32, - .long, .ulong => return if (target.abi != .gnuabin32) 64 else 32, + .long, .ulong => switch (target.abi) { + .gnuabin32, .muslabin32 => return 32, + else => return 64, + }, .longlong, .ulonglong, .double => return 64, .longdouble => return 128, }, @@ -2821,6 +2828,8 @@ pub fn cTypeBitSize(target: Target, c_type: CType) u16 { .powerpc64le, => switch (target.abi) { .musl, + .muslabin32, + .muslabi64, .musleabi, .musleabihf, .muslx32, @@ -2876,7 +2885,10 @@ pub fn cTypeBitSize(target: Target, c_type: CType) u16 { .char => return 8, .short, .ushort => return 16, .int, .uint, .float => return 32, - .long, .ulong => return if (target.abi != .gnuabin32) 64 else 32, + .long, .ulong => switch (target.abi) { + .gnuabin32, .muslabin32 => return 32, + else => return 64, + }, .longlong, .ulonglong, .double => return 64, .longdouble => if (target.os.tag == .freebsd) return 64 else return 128, }, @@ -2907,6 +2919,8 @@ pub fn cTypeBitSize(target: Target, c_type: CType) u16 { .powerpcle, => switch (target.abi) { .musl, + .muslabin32, + .muslabi64, .musleabi, .musleabihf, .muslx32, @@ -2921,6 +2935,8 @@ pub fn cTypeBitSize(target: Target, c_type: CType) u16 { .powerpc64le, => switch (target.abi) { .musl, + .muslabin32, + .muslabi64, .musleabi, .musleabihf, .muslx32, diff --git a/lib/std/os/linux.zig b/lib/std/os/linux.zig index bccbba5aed..f563264f07 100644 --- a/lib/std/os/linux.zig +++ b/lib/std/os/linux.zig @@ -136,10 +136,10 @@ pub const SYS = switch (@import("builtin").cpu.arch) { .loongarch64 => syscalls.LoongArch64, .m68k => syscalls.M68k, .mips, .mipsel => syscalls.MipsO32, - .mips64, .mips64el => if (builtin.abi == .gnuabin32) - syscalls.MipsN32 - else - syscalls.MipsN64, + .mips64, .mips64el => switch (builtin.abi) { + .gnuabin32, .muslabin32 => syscalls.MipsN32, + else => syscalls.MipsN64, + }, .powerpc, .powerpcle => syscalls.PowerPC, .powerpc64, .powerpc64le => syscalls.PowerPC64, .s390x => syscalls.S390x, @@ -8657,11 +8657,11 @@ pub const AUDIT = struct { .mips => .MIPS, .mipsel => .MIPSEL, .mips64 => switch (native_abi) { - .gnuabin32 => .MIPS64N32, + .gnuabin32, .muslabin32 => .MIPS64N32, else => .MIPS64, }, .mips64el => switch (native_abi) { - .gnuabin32 => .MIPSEL64N32, + .gnuabin32, .muslabin32 => .MIPSEL64N32, else => .MIPSEL64, }, .powerpc => .PPC, diff --git a/lib/std/zig/LibCDirs.zig b/lib/std/zig/LibCDirs.zig index 536ef7ab71..43c4c5d28f 100644 --- a/lib/std/zig/LibCDirs.zig +++ b/lib/std/zig/LibCDirs.zig @@ -232,6 +232,8 @@ fn libCGenericName(target: std.Target) [:0]const u8 { .gnuilp32, => return "glibc", .musl, + .muslabin32, + .muslabi64, .musleabi, .musleabihf, .muslx32, diff --git a/lib/std/zig/system.zig b/lib/std/zig/system.zig index 15392d34f1..5eee0a38df 100644 --- a/lib/std/zig/system.zig +++ b/lib/std/zig/system.zig @@ -91,16 +91,16 @@ pub fn getExternalExecutor( .mips => Executor{ .qemu = "qemu-mips" }, .mipsel => Executor{ .qemu = "qemu-mipsel" }, .mips64 => Executor{ - .qemu = if (candidate.abi == .gnuabin32) - "qemu-mipsn32" - else - "qemu-mips64", + .qemu = switch (candidate.abi) { + .gnuabin32, .muslabin32 => "qemu-mipsn32", + else => "qemu-mips64", + }, }, .mips64el => Executor{ - .qemu = if (candidate.abi == .gnuabin32) - "qemu-mipsn32el" - else - "qemu-mips64el", + .qemu = switch (candidate.abi) { + .gnuabin32, .muslabin32 => "qemu-mipsn32el", + else => "qemu-mips64el", + }, }, .powerpc => Executor{ .qemu = "qemu-ppc" }, .powerpc64 => Executor{ .qemu = "qemu-ppc64" }, diff --git a/lib/std/zig/target.zig b/lib/std/zig/target.zig index 46ac895dcd..110c2ec321 100644 --- a/lib/std/zig/target.zig +++ b/lib/std/zig/target.zig @@ -99,6 +99,7 @@ pub fn canBuildLibC(target: std.Target) bool { pub fn muslArchName(arch: std.Target.Cpu.Arch, abi: std.Target.Abi) [:0]const u8 { return switch (abi) { + .muslabin32 => "mipsn32", .muslx32 => "x32", else => switch (arch) { .arm, .armeb, .thumb, .thumbeb => "arm", @@ -129,6 +130,7 @@ pub fn muslArchNameHeaders(arch: std.Target.Cpu.Arch) [:0]const u8 { pub fn muslAbiNameHeaders(abi: std.Target.Abi) [:0]const u8 { return switch (abi) { + .muslabin32 => "mipsn32", .muslx32 => "muslx32", else => "musl", }; diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig index fc7d26a815..0a1073efcf 100644 --- a/src/codegen/llvm.zig +++ b/src/codegen/llvm.zig @@ -270,6 +270,8 @@ pub fn targetTriple(allocator: Allocator, target: std.Target) ![]const u8 { .android => "android", .androideabi => "androideabi", .musl => "musl", + .muslabin32 => "musl", // Should be muslabin32 in LLVM 20. + .muslabi64 => "musl", // Should be muslabi64 in LLVM 20. .musleabi => "musleabi", .musleabihf => "musleabihf", .muslx32 => "muslx32", diff --git a/src/link/Elf.zig b/src/link/Elf.zig index ccc9e24bf6..840ea02f5d 100644 --- a/src/link/Elf.zig +++ b/src/link/Elf.zig @@ -4100,21 +4100,21 @@ fn getLDMOption(target: std.Target) ?[]const u8 { }, .mips64 => switch (target.os.tag) { .freebsd => switch (target.abi) { - .gnuabin32 => "elf32btsmipn32_fbsd", + .gnuabin32, .muslabin32 => "elf32btsmipn32_fbsd", else => "elf64btsmip_fbsd", }, else => switch (target.abi) { - .gnuabin32 => "elf32btsmipn32", + .gnuabin32, .muslabin32 => "elf32btsmipn32", else => "elf64btsmip", }, }, .mips64el => switch (target.os.tag) { .freebsd => switch (target.abi) { - .gnuabin32 => "elf32ltsmipn32_fbsd", + .gnuabin32, .muslabin32 => "elf32ltsmipn32_fbsd", else => "elf64ltsmip_fbsd", }, else => switch (target.abi) { - .gnuabin32 => "elf32ltsmipn32", + .gnuabin32, .muslabin32 => "elf32ltsmipn32", else => "elf64ltsmip", }, }, diff --git a/src/target.zig b/src/target.zig index e4f1d28043..2327ff0c4a 100644 --- a/src/target.zig +++ b/src/target.zig @@ -438,6 +438,16 @@ pub fn arePointersLogical(target: std.Target, as: AddressSpace) bool { } pub fn llvmMachineAbi(target: std.Target) ?[:0]const u8 { + // This special-casing should be removed with LLVM 20. + switch (target.cpu.arch) { + .mips, .mipsel => return "o32", + .mips64, .mips64el => return switch (target.abi) { + .gnuabin32, .muslabin32 => "n32", + else => "n64", + }, + else => {}, + } + // LLD does not support ELFv1. Rather than having LLVM produce ELFv1 code and then linking it // into a broken ELFv2 binary, just force LLVM to use ELFv2 as well. This will break when glibc // is linked as glibc only supports ELFv2 for little endian, but there's nothing we can do about diff --git a/test/llvm_targets.zig b/test/llvm_targets.zig index 15ff356fd3..7cf7d3e8d9 100644 --- a/test/llvm_targets.zig +++ b/test/llvm_targets.zig @@ -161,6 +161,8 @@ const targets = [_]std.Target.Query{ .{ .cpu_arch = .mips64, .os_tag = .linux, .abi = .gnuabi64 }, .{ .cpu_arch = .mips64, .os_tag = .linux, .abi = .gnuabin32 }, .{ .cpu_arch = .mips64, .os_tag = .linux, .abi = .musl }, + .{ .cpu_arch = .mips64, .os_tag = .linux, .abi = .muslabi64 }, + .{ .cpu_arch = .mips64, .os_tag = .linux, .abi = .muslabin32 }, .{ .cpu_arch = .mips64, .os_tag = .linux, .abi = .none }, .{ .cpu_arch = .mips64, .os_tag = .netbsd, .abi = .none }, .{ .cpu_arch = .mips64, .os_tag = .openbsd, .abi = .none }, @@ -170,6 +172,8 @@ const targets = [_]std.Target.Query{ .{ .cpu_arch = .mips64el, .os_tag = .linux, .abi = .gnuabi64 }, .{ .cpu_arch = .mips64el, .os_tag = .linux, .abi = .gnuabin32 }, .{ .cpu_arch = .mips64el, .os_tag = .linux, .abi = .musl }, + .{ .cpu_arch = .mips64el, .os_tag = .linux, .abi = .muslabi64 }, + .{ .cpu_arch = .mips64el, .os_tag = .linux, .abi = .muslabin32 }, .{ .cpu_arch = .mips64el, .os_tag = .linux, .abi = .none }, .{ .cpu_arch = .mips64el, .os_tag = .netbsd, .abi = .none }, .{ .cpu_arch = .mips64el, .os_tag = .openbsd, .abi = .none }, From 497b502ce465189a96421be831c0cc0be6e8c2f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Wed, 16 Oct 2024 03:38:15 +0200 Subject: [PATCH 05/14] process_headers: Simplify the code a bit. --- tools/process_headers.zig | 351 +++++++------------------------------- 1 file changed, 62 insertions(+), 289 deletions(-) diff --git a/tools/process_headers.zig b/tools/process_headers.zig index 970c383886..1d38a68644 100644 --- a/tools/process_headers.zig +++ b/tools/process_headers.zig @@ -19,273 +19,63 @@ const Blake3 = std.crypto.hash.Blake3; const LibCTarget = struct { name: []const u8, - arch: MultiArch, - abi: MultiAbi, -}; - -const MultiArch = union(enum) { - aarch64, - arm, - mips, - mips64, - powerpc64, - specific: Arch, - - fn eql(a: MultiArch, b: MultiArch) bool { - if (@intFromEnum(a) != @intFromEnum(b)) - return false; - if (a != .specific) - return true; - return a.specific == b.specific; - } -}; - -const MultiAbi = union(enum) { - musl, - specific: Abi, - - fn eql(a: MultiAbi, b: MultiAbi) bool { - if (@intFromEnum(a) != @intFromEnum(b)) - return false; - if (std.meta.Tag(MultiAbi)(a) != .specific) - return true; - return a.specific == b.specific; - } + arch: Arch, + abi: Abi, }; const glibc_targets = [_]LibCTarget{ - LibCTarget{ - .name = "aarch64_be-linux-gnu", - .arch = MultiArch{ .specific = Arch.aarch64_be }, - .abi = MultiAbi{ .specific = Abi.gnu }, - }, - LibCTarget{ - .name = "aarch64-linux-gnu", - .arch = MultiArch{ .specific = Arch.aarch64 }, - .abi = MultiAbi{ .specific = Abi.gnu }, - }, - LibCTarget{ - .name = "armeb-linux-gnueabi", - .arch = MultiArch{ .specific = Arch.armeb }, - .abi = MultiAbi{ .specific = Abi.gnueabi }, - }, - LibCTarget{ - .name = "armeb-linux-gnueabihf", - .arch = MultiArch{ .specific = Arch.armeb }, - .abi = MultiAbi{ .specific = Abi.gnueabihf }, - }, - LibCTarget{ - .name = "arm-linux-gnueabi", - .arch = MultiArch{ .specific = Arch.arm }, - .abi = MultiAbi{ .specific = Abi.gnueabi }, - }, - LibCTarget{ - .name = "arm-linux-gnueabihf", - .arch = MultiArch{ .specific = Arch.arm }, - .abi = MultiAbi{ .specific = Abi.gnueabihf }, - }, - LibCTarget{ - .name = "arc-linux-gnu", - .arch = MultiArch{ .specific = Arch.arc }, - .abi = MultiAbi{ .specific = Abi.gnu }, - }, - LibCTarget{ - .name = "csky-linux-gnuabiv2", - .arch = MultiArch{ .specific = Arch.csky }, - .abi = MultiAbi{ .specific = Abi.gnueabihf }, - }, - LibCTarget{ - .name = "csky-linux-gnuabiv2-soft", - .arch = MultiArch{ .specific = Arch.csky }, - .abi = MultiAbi{ .specific = Abi.gnueabi }, - }, - LibCTarget{ - .name = "i686-linux-gnu", - .arch = MultiArch{ .specific = Arch.x86 }, - .abi = MultiAbi{ .specific = Abi.gnu }, - }, - LibCTarget{ - .name = "mips64el-linux-gnu-n32", - .arch = MultiArch{ .specific = Arch.mips64el }, - .abi = MultiAbi{ .specific = Abi.gnuabin32 }, - }, - LibCTarget{ - .name = "mips64el-linux-gnu-n64", - .arch = MultiArch{ .specific = Arch.mips64el }, - .abi = MultiAbi{ .specific = Abi.gnuabi64 }, - }, - LibCTarget{ - .name = "mips64-linux-gnu-n32", - .arch = MultiArch{ .specific = Arch.mips64 }, - .abi = MultiAbi{ .specific = Abi.gnuabin32 }, - }, - LibCTarget{ - .name = "mips64-linux-gnu-n64", - .arch = MultiArch{ .specific = Arch.mips64 }, - .abi = MultiAbi{ .specific = Abi.gnuabi64 }, - }, - LibCTarget{ - .name = "mipsel-linux-gnu", - .arch = MultiArch{ .specific = Arch.mipsel }, - .abi = MultiAbi{ .specific = Abi.gnueabihf }, - }, - LibCTarget{ - .name = "mipsel-linux-gnu-soft", - .arch = MultiArch{ .specific = Arch.mipsel }, - .abi = MultiAbi{ .specific = Abi.gnueabi }, - }, - LibCTarget{ - .name = "mips-linux-gnu", - .arch = MultiArch{ .specific = Arch.mips }, - .abi = MultiAbi{ .specific = Abi.gnueabihf }, - }, - LibCTarget{ - .name = "mips-linux-gnu-soft", - .arch = MultiArch{ .specific = Arch.mips }, - .abi = MultiAbi{ .specific = Abi.gnueabi }, - }, - LibCTarget{ - .name = "powerpc64le-linux-gnu", - .arch = MultiArch{ .specific = Arch.powerpc64le }, - .abi = MultiAbi{ .specific = Abi.gnu }, - }, - LibCTarget{ - .name = "powerpc64-linux-gnu", - .arch = MultiArch{ .specific = Arch.powerpc64 }, - .abi = MultiAbi{ .specific = Abi.gnu }, - }, - LibCTarget{ - .name = "powerpc-linux-gnu", - .arch = MultiArch{ .specific = Arch.powerpc }, - .abi = MultiAbi{ .specific = Abi.gnueabihf }, - }, - LibCTarget{ - .name = "powerpc-linux-gnu-soft", - .arch = MultiArch{ .specific = Arch.powerpc }, - .abi = MultiAbi{ .specific = Abi.gnueabi }, - }, - LibCTarget{ - .name = "riscv32-linux-gnu-rv32imafdc-ilp32d", - .arch = MultiArch{ .specific = Arch.riscv32 }, - .abi = MultiAbi{ .specific = Abi.gnu }, - }, - LibCTarget{ - .name = "riscv64-linux-gnu-rv64imafdc-lp64d", - .arch = MultiArch{ .specific = Arch.riscv64 }, - .abi = MultiAbi{ .specific = Abi.gnu }, - }, - LibCTarget{ - .name = "s390x-linux-gnu", - .arch = MultiArch{ .specific = Arch.s390x }, - .abi = MultiAbi{ .specific = Abi.gnu }, - }, - LibCTarget{ - .name = "sparcv9-linux-gnu", - .arch = MultiArch{ .specific = Arch.sparc }, - .abi = MultiAbi{ .specific = Abi.gnu }, - }, - LibCTarget{ - .name = "sparc64-linux-gnu", - .arch = MultiArch{ .specific = Arch.sparc64 }, - .abi = MultiAbi{ .specific = Abi.gnu }, - }, - LibCTarget{ - .name = "x86_64-linux-gnu", - .arch = MultiArch{ .specific = Arch.x86_64 }, - .abi = MultiAbi{ .specific = Abi.gnu }, - }, - LibCTarget{ - .name = "x86_64-linux-gnu-x32", - .arch = MultiArch{ .specific = Arch.x86_64 }, - .abi = MultiAbi{ .specific = Abi.gnux32 }, - }, - LibCTarget{ - .name = "m68k-linux-gnu", - .arch = MultiArch{ .specific = Arch.m68k }, - .abi = MultiAbi{ .specific = Abi.gnu }, - }, - LibCTarget{ - .name = "loongarch64-linux-gnu-lp64d", - .arch = MultiArch{ .specific = .loongarch64 }, - .abi = MultiAbi{ .specific = Abi.gnu }, - }, - LibCTarget{ - .name = "loongarch64-linux-gnu-lp64s", - .arch = MultiArch{ .specific = .loongarch64 }, - .abi = MultiAbi{ .specific = Abi.gnusf }, - }, + .{ .name = "arc-linux-gnu", .arch = .arc, .abi = .gnu }, + .{ .name = "arm-linux-gnueabi", .arch = .arm, .abi = .gnueabi }, + .{ .name = "arm-linux-gnueabihf", .arch = .arm, .abi = .gnueabihf }, + .{ .name = "armeb-linux-gnueabi", .arch = .armeb, .abi = .gnueabi }, + .{ .name = "armeb-linux-gnueabihf", .arch = .armeb, .abi = .gnueabihf }, + .{ .name = "aarch64-linux-gnu", .arch = .aarch64, .abi = .gnu }, + .{ .name = "aarch64_be-linux-gnu", .arch = .aarch64_be, .abi = .gnu }, + .{ .name = "csky-linux-gnuabiv2-soft", .arch = .csky, .abi = .gnueabi }, + .{ .name = "csky-linux-gnuabiv2", .arch = .csky, .abi = .gnueabihf }, + .{ .name = "loongarch64-linux-gnu-lp64d", .arch = .loongarch64, .abi = .gnu }, + .{ .name = "loongarch64-linux-gnu-lp64s", .arch = .loongarch64, .abi = .gnusf }, + .{ .name = "m68k-linux-gnu", .arch = .m68k, .abi = .gnu }, + .{ .name = "mips-linux-gnu", .arch = .mips, .abi = .gnueabihf }, + .{ .name = "mips-linux-gnu-soft", .arch = .mips, .abi = .gnueabi }, + .{ .name = "mipsel-linux-gnu-soft", .arch = .mipsel, .abi = .gnueabi }, + .{ .name = "mipsel-linux-gnu", .arch = .mipsel, .abi = .gnueabihf }, + .{ .name = "mips64-linux-gnu-n64", .arch = .mips64, .abi = .gnuabi64 }, + .{ .name = "mips64-linux-gnu-n32", .arch = .mips64, .abi = .gnuabin32 }, + .{ .name = "mips64el-linux-gnu-n64", .arch = .mips64el, .abi = .gnuabi64 }, + .{ .name = "mips64el-linux-gnu-n32", .arch = .mips64el, .abi = .gnuabin32 }, + .{ .name = "powerpc-linux-gnu-soft", .arch = .powerpc, .abi = .gnueabi }, + .{ .name = "powerpc-linux-gnu", .arch = .powerpc, .abi = .gnueabihf }, + .{ .name = "powerpc64-linux-gnu", .arch = .powerpc64, .abi = .gnu }, + .{ .name = "powerpc64le-linux-gnu", .arch = .powerpc64le, .abi = .gnu }, + .{ .name = "riscv32-linux-gnu-rv32imafdc-ilp32d", .arch = .riscv32, .abi = .gnu }, + .{ .name = "riscv64-linux-gnu-rv64imafdc-lp64d", .arch = .riscv64, .abi = .gnu }, + .{ .name = "s390x-linux-gnu", .arch = .s390x, .abi = .gnu }, + .{ .name = "sparcv9-linux-gnu", .arch = .sparc, .abi = .gnu }, + .{ .name = "sparc64-linux-gnu", .arch = .sparc64, .abi = .gnu }, + .{ .name = "i686-linux-gnu", .arch = .x86, .abi = .gnu }, + .{ .name = "x86_64-linux-gnu", .arch = .x86_64, .abi = .gnu }, + .{ .name = "x86_64-linux-gnu-x32", .arch = .x86_64, .abi = .gnux32 }, }; const musl_targets = [_]LibCTarget{ - LibCTarget{ - .name = "aarch64", - .arch = MultiArch.aarch64, - .abi = MultiAbi.musl, - }, - LibCTarget{ - .name = "arm", - .arch = MultiArch.arm, - .abi = MultiAbi.musl, - }, - LibCTarget{ - .name = "i386", - .arch = MultiArch{ .specific = .x86 }, - .abi = MultiAbi.musl, - }, - LibCTarget{ - .name = "loongarch64", - .arch = MultiArch{ .specific = .loongarch64 }, - .abi = MultiAbi.musl, - }, - LibCTarget{ - .name = "mips", - .arch = MultiArch.mips, - .abi = MultiAbi.musl, - }, - LibCTarget{ - .name = "mips64", - .arch = MultiArch.mips64, - .abi = MultiAbi.musl, - }, - LibCTarget{ - .name = "powerpc", - .arch = MultiArch{ .specific = .powerpc }, - .abi = MultiAbi.musl, - }, - LibCTarget{ - .name = "powerpc64", - .arch = MultiArch.powerpc64, - .abi = MultiAbi.musl, - }, - LibCTarget{ - .name = "riscv32", - .arch = MultiArch{ .specific = .riscv32 }, - .abi = MultiAbi.musl, - }, - LibCTarget{ - .name = "riscv64", - .arch = MultiArch{ .specific = .riscv64 }, - .abi = MultiAbi.musl, - }, - LibCTarget{ - .name = "s390x", - .arch = MultiArch{ .specific = .s390x }, - .abi = MultiAbi.musl, - }, - LibCTarget{ - .name = "x86_64", - .arch = MultiArch{ .specific = .x86_64 }, - .abi = MultiAbi.musl, - }, - LibCTarget{ - .name = "m68k", - .arch = MultiArch{ .specific = .m68k }, - .abi = MultiAbi{ .specific = .musl }, - }, + .{ .name = "arm", .arch = .arm, .abi = .musl }, + .{ .name = "aarch64", .arch = .aarch64, .abi = .musl }, + .{ .name = "loongarch64", .arch = .loongarch64, .abi = .musl }, + .{ .name = "m68k", .arch = .m68k, .abi = .musl }, + .{ .name = "mips", .arch = .mips, .abi = .musl }, + .{ .name = "mips64", .arch = .mips64, .abi = .musl }, + .{ .name = "powerpc", .arch = .powerpc, .abi = .musl }, + .{ .name = "powerpc64", .arch = .powerpc64, .abi = .musl }, + .{ .name = "riscv32", .arch = .riscv32, .abi = .musl }, + .{ .name = "riscv64", .arch = .riscv64, .abi = .musl }, + .{ .name = "s390x", .arch = .s390x, .abi = .musl }, + .{ .name = "i386", .arch = .x86, .abi = .musl }, + .{ .name = "x86_64", .arch = .x86_64, .abi = .musl }, }; const DestTarget = struct { - arch: MultiArch, + arch: Arch, os: OsTag, abi: Abi, @@ -300,7 +90,7 @@ const DestTarget = struct { pub fn eql(self: @This(), a: DestTarget, b: DestTarget, b_index: usize) bool { _ = self; _ = b_index; - return a.arch.eql(b.arch) and + return a.arch == b.arch and a.os == b.os and a.abi == b.abi; } @@ -363,22 +153,16 @@ pub fn main() !void { const out_dir = opt_out_dir orelse usageAndExit(args[0]); const abi_name = opt_abi orelse usageAndExit(args[0]); - const vendor = if (std.mem.eql(u8, abi_name, "musl")) - LibCVendor.musl - else if (std.mem.eql(u8, abi_name, "glibc")) - LibCVendor.glibc - else { + const vendor = std.meta.stringToEnum(LibCVendor, abi_name) orelse { std.debug.print("unrecognized C ABI: {s}\n", .{abi_name}); usageAndExit(args[0]); }; - const generic_name = try std.fmt.allocPrint(allocator, "generic-{s}", .{abi_name}); - // TODO compiler crashed when I wrote this the canonical way - var libc_targets: []const LibCTarget = undefined; - switch (vendor) { - .musl => libc_targets = &musl_targets, - .glibc => libc_targets = &glibc_targets, - } + const generic_name = try std.fmt.allocPrint(allocator, "generic-{s}", .{abi_name}); + const libc_targets = switch (vendor) { + .glibc => &glibc_targets, + .musl => &musl_targets, + }; var path_table = PathTable.init(allocator); var hash_to_contents = HashToContents.init(allocator); @@ -390,22 +174,15 @@ pub fn main() !void { for (libc_targets) |libc_target| { const dest_target = DestTarget{ .arch = libc_target.arch, - .abi = switch (vendor) { - .musl => .musl, - .glibc => libc_target.abi.specific, - }, .os = .linux, + .abi = libc_target.abi, }; + search: for (search_paths.items) |search_path| { - var sub_path: []const []const u8 = undefined; - switch (vendor) { - .musl => { - sub_path = &[_][]const u8{ search_path, libc_target.name, "usr", "local", "musl", "include" }; - }, - .glibc => { - sub_path = &[_][]const u8{ search_path, libc_target.name, "usr", "include" }; - }, - } + const sub_path = switch (vendor) { + .glibc => &[_][]const u8{ search_path, libc_target.name, "usr", "include" }, + .musl => &[_][]const u8{ search_path, libc_target.name, "usr", "local", "musl", "include" }, + }; const target_include_dir = try std.fs.path.join(allocator, sub_path); var dir_stack = std.ArrayList([]const u8).init(allocator); try dir_stack.append(target_include_dir); @@ -515,12 +292,8 @@ pub fn main() !void { if (contents.is_generic) continue; const dest_target = hash_kv.key_ptr.*; - const arch_name = switch (dest_target.arch) { - .specific => |a| @tagName(a), - else => @tagName(dest_target.arch), - }; const out_subpath = try std.fmt.allocPrint(allocator, "{s}-{s}-{s}", .{ - arch_name, + @tagName(dest_target.arch), @tagName(dest_target.os), @tagName(dest_target.abi), }); From 94cf5b26f4fc764ca10bd7611c46156c29d254d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Wed, 16 Oct 2024 04:41:52 +0200 Subject: [PATCH 06/14] process_headers: Add muslabin32 and muslx32 support. --- lib/std/zig/target.zig | 2 +- tools/process_headers.zig | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/std/zig/target.zig b/lib/std/zig/target.zig index 110c2ec321..60a49a19e7 100644 --- a/lib/std/zig/target.zig +++ b/lib/std/zig/target.zig @@ -130,7 +130,7 @@ pub fn muslArchNameHeaders(arch: std.Target.Cpu.Arch) [:0]const u8 { pub fn muslAbiNameHeaders(abi: std.Target.Abi) [:0]const u8 { return switch (abi) { - .muslabin32 => "mipsn32", + .muslabin32 => "muslabin32", .muslx32 => "muslx32", else => "musl", }; diff --git a/tools/process_headers.zig b/tools/process_headers.zig index 1d38a68644..ccd4e1ae96 100644 --- a/tools/process_headers.zig +++ b/tools/process_headers.zig @@ -65,6 +65,7 @@ const musl_targets = [_]LibCTarget{ .{ .name = "m68k", .arch = .m68k, .abi = .musl }, .{ .name = "mips", .arch = .mips, .abi = .musl }, .{ .name = "mips64", .arch = .mips64, .abi = .musl }, + .{ .name = "mipsn32", .arch = .mips64, .abi = .muslabin32 }, .{ .name = "powerpc", .arch = .powerpc, .abi = .musl }, .{ .name = "powerpc64", .arch = .powerpc64, .abi = .musl }, .{ .name = "riscv32", .arch = .riscv32, .abi = .musl }, @@ -72,6 +73,7 @@ const musl_targets = [_]LibCTarget{ .{ .name = "s390x", .arch = .s390x, .abi = .musl }, .{ .name = "i386", .arch = .x86, .abi = .musl }, .{ .name = "x86_64", .arch = .x86_64, .abi = .musl }, + .{ .name = "x32", .arch = .x86_64, .abi = .muslx32 }, }; const DestTarget = struct { From 3ec27ae648246667e7d8258256ebb06683125037 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Wed, 16 Oct 2024 04:44:03 +0200 Subject: [PATCH 07/14] musl: Update headers from musl 1.2.5. Adds mips64-linux-muslabin32 and x86_64-linux-muslx32 headers. --- .../include/aarch64-linux-musl/bits/stdint.h | 20 + lib/libc/include/generic-musl/bits/alltypes.h | 408 ++++++++++ lib/libc/include/generic-musl/bits/fenv.h | 41 +- lib/libc/include/generic-musl/bits/setjmp.h | 1 + lib/libc/include/generic-musl/bits/signal.h | 142 ++++ lib/libc/include/generic-musl/bits/stdint.h | 12 +- .../loongarch64-linux-musl/bits/stdint.h | 20 + .../include/mips64-linux-musl/bits/stdint.h | 20 + .../mips64-linux-muslabin32/bits/errno.h | 134 ++++ .../mips64-linux-muslabin32/bits/fcntl.h | 40 + .../mips64-linux-muslabin32/bits/fenv.h | 25 + .../mips64-linux-muslabin32/bits/hwcap.h | 3 + .../mips64-linux-muslabin32/bits/ioctl.h | 114 +++ .../mips64-linux-muslabin32/bits/ipcstat.h | 1 + .../mips64-linux-muslabin32/bits/mman.h | 25 + .../mips64-linux-muslabin32/bits/msg.h | 27 + .../mips64-linux-muslabin32/bits/poll.h | 2 + .../mips64-linux-muslabin32/bits/ptrace.h | 9 + .../mips64-linux-muslabin32/bits/reg.h | 47 ++ .../mips64-linux-muslabin32/bits/resource.h | 5 + .../mips64-linux-muslabin32/bits/sem.h | 16 + .../mips64-linux-muslabin32/bits/shm.h | 29 + .../mips64-linux-muslabin32/bits/socket.h | 35 + .../mips64-linux-muslabin32/bits/stat.h | 23 + .../mips64-linux-muslabin32/bits/statfs.h | 8 + .../mips64-linux-muslabin32/bits/syscall.h | 759 ++++++++++++++++++ .../mips64-linux-muslabin32/bits/termios.h | 169 ++++ .../mips64-linux-muslabin32/bits/user.h | 15 + .../powerpc64-linux-musl/bits/stdint.h | 20 + .../include/riscv32-linux-musl/bits/fenv.h | 17 + .../include/riscv64-linux-musl/bits/fenv.h | 17 + .../include/riscv64-linux-musl/bits/stdint.h | 20 + .../include/s390x-linux-musl/bits/stdint.h | 20 + .../include/x86_64-linux-musl/bits/stdint.h | 20 + .../x86_64-linux-muslx32/bits/alltypes.h | 423 ++++++++++ .../include/x86_64-linux-muslx32/bits/fcntl.h | 40 + .../include/x86_64-linux-muslx32/bits/float.h | 20 + .../include/x86_64-linux-muslx32/bits/io.h | 77 ++ .../x86_64-linux-muslx32/bits/ioctl_fix.h | 4 + .../include/x86_64-linux-muslx32/bits/ipc.h | 11 + .../x86_64-linux-muslx32/bits/limits.h | 1 + .../include/x86_64-linux-muslx32/bits/mman.h | 1 + .../include/x86_64-linux-muslx32/bits/msg.h | 15 + .../x86_64-linux-muslx32/bits/ptrace.h | 13 + .../include/x86_64-linux-muslx32/bits/reg.h | 29 + .../include/x86_64-linux-muslx32/bits/sem.h | 11 + .../x86_64-linux-muslx32/bits/setjmp.h | 1 + .../include/x86_64-linux-muslx32/bits/shm.h | 32 + .../x86_64-linux-muslx32/bits/signal.h | 152 ++++ .../x86_64-linux-muslx32/bits/socket.h | 5 + .../include/x86_64-linux-muslx32/bits/stat.h | 22 + .../x86_64-linux-muslx32/bits/statfs.h | 9 + .../x86_64-linux-muslx32/bits/syscall.h | 707 ++++++++++++++++ .../include/x86_64-linux-muslx32/bits/user.h | 41 + 54 files changed, 3860 insertions(+), 18 deletions(-) create mode 100644 lib/libc/include/aarch64-linux-musl/bits/stdint.h create mode 100644 lib/libc/include/generic-musl/bits/alltypes.h create mode 100644 lib/libc/include/generic-musl/bits/setjmp.h create mode 100644 lib/libc/include/generic-musl/bits/signal.h create mode 100644 lib/libc/include/loongarch64-linux-musl/bits/stdint.h create mode 100644 lib/libc/include/mips64-linux-musl/bits/stdint.h create mode 100644 lib/libc/include/mips64-linux-muslabin32/bits/errno.h create mode 100644 lib/libc/include/mips64-linux-muslabin32/bits/fcntl.h create mode 100644 lib/libc/include/mips64-linux-muslabin32/bits/fenv.h create mode 100644 lib/libc/include/mips64-linux-muslabin32/bits/hwcap.h create mode 100644 lib/libc/include/mips64-linux-muslabin32/bits/ioctl.h create mode 100644 lib/libc/include/mips64-linux-muslabin32/bits/ipcstat.h create mode 100644 lib/libc/include/mips64-linux-muslabin32/bits/mman.h create mode 100644 lib/libc/include/mips64-linux-muslabin32/bits/msg.h create mode 100644 lib/libc/include/mips64-linux-muslabin32/bits/poll.h create mode 100644 lib/libc/include/mips64-linux-muslabin32/bits/ptrace.h create mode 100644 lib/libc/include/mips64-linux-muslabin32/bits/reg.h create mode 100644 lib/libc/include/mips64-linux-muslabin32/bits/resource.h create mode 100644 lib/libc/include/mips64-linux-muslabin32/bits/sem.h create mode 100644 lib/libc/include/mips64-linux-muslabin32/bits/shm.h create mode 100644 lib/libc/include/mips64-linux-muslabin32/bits/socket.h create mode 100644 lib/libc/include/mips64-linux-muslabin32/bits/stat.h create mode 100644 lib/libc/include/mips64-linux-muslabin32/bits/statfs.h create mode 100644 lib/libc/include/mips64-linux-muslabin32/bits/syscall.h create mode 100644 lib/libc/include/mips64-linux-muslabin32/bits/termios.h create mode 100644 lib/libc/include/mips64-linux-muslabin32/bits/user.h create mode 100644 lib/libc/include/powerpc64-linux-musl/bits/stdint.h create mode 100644 lib/libc/include/riscv32-linux-musl/bits/fenv.h create mode 100644 lib/libc/include/riscv64-linux-musl/bits/fenv.h create mode 100644 lib/libc/include/riscv64-linux-musl/bits/stdint.h create mode 100644 lib/libc/include/s390x-linux-musl/bits/stdint.h create mode 100644 lib/libc/include/x86_64-linux-musl/bits/stdint.h create mode 100644 lib/libc/include/x86_64-linux-muslx32/bits/alltypes.h create mode 100644 lib/libc/include/x86_64-linux-muslx32/bits/fcntl.h create mode 100644 lib/libc/include/x86_64-linux-muslx32/bits/float.h create mode 100644 lib/libc/include/x86_64-linux-muslx32/bits/io.h create mode 100644 lib/libc/include/x86_64-linux-muslx32/bits/ioctl_fix.h create mode 100644 lib/libc/include/x86_64-linux-muslx32/bits/ipc.h create mode 100644 lib/libc/include/x86_64-linux-muslx32/bits/limits.h create mode 100644 lib/libc/include/x86_64-linux-muslx32/bits/mman.h create mode 100644 lib/libc/include/x86_64-linux-muslx32/bits/msg.h create mode 100644 lib/libc/include/x86_64-linux-muslx32/bits/ptrace.h create mode 100644 lib/libc/include/x86_64-linux-muslx32/bits/reg.h create mode 100644 lib/libc/include/x86_64-linux-muslx32/bits/sem.h create mode 100644 lib/libc/include/x86_64-linux-muslx32/bits/setjmp.h create mode 100644 lib/libc/include/x86_64-linux-muslx32/bits/shm.h create mode 100644 lib/libc/include/x86_64-linux-muslx32/bits/signal.h create mode 100644 lib/libc/include/x86_64-linux-muslx32/bits/socket.h create mode 100644 lib/libc/include/x86_64-linux-muslx32/bits/stat.h create mode 100644 lib/libc/include/x86_64-linux-muslx32/bits/statfs.h create mode 100644 lib/libc/include/x86_64-linux-muslx32/bits/syscall.h create mode 100644 lib/libc/include/x86_64-linux-muslx32/bits/user.h diff --git a/lib/libc/include/aarch64-linux-musl/bits/stdint.h b/lib/libc/include/aarch64-linux-musl/bits/stdint.h new file mode 100644 index 0000000000..02714d7398 --- /dev/null +++ b/lib/libc/include/aarch64-linux-musl/bits/stdint.h @@ -0,0 +1,20 @@ +typedef int32_t int_fast16_t; +typedef int32_t int_fast32_t; +typedef uint32_t uint_fast16_t; +typedef uint32_t uint_fast32_t; + +#define INT_FAST16_MIN INT32_MIN +#define INT_FAST32_MIN INT32_MIN + +#define INT_FAST16_MAX INT32_MAX +#define INT_FAST32_MAX INT32_MAX + +#define UINT_FAST16_MAX UINT32_MAX +#define UINT_FAST32_MAX UINT32_MAX + +#define INTPTR_MIN INT64_MIN +#define INTPTR_MAX INT64_MAX +#define UINTPTR_MAX UINT64_MAX +#define PTRDIFF_MIN INT64_MIN +#define PTRDIFF_MAX INT64_MAX +#define SIZE_MAX UINT64_MAX \ No newline at end of file diff --git a/lib/libc/include/generic-musl/bits/alltypes.h b/lib/libc/include/generic-musl/bits/alltypes.h new file mode 100644 index 0000000000..46b309d668 --- /dev/null +++ b/lib/libc/include/generic-musl/bits/alltypes.h @@ -0,0 +1,408 @@ +#define _REDIR_TIME64 1 +#define _Addr int +#define _Int64 long long +#define _Reg int + +#if _MIPSEL || __MIPSEL || __MIPSEL__ +#define __BYTE_ORDER 1234 +#else +#define __BYTE_ORDER 4321 +#endif + +#define __LONG_MAX 0x7fffffffL + +#ifndef __cplusplus +#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t) +typedef int wchar_t; +#define __DEFINED_wchar_t +#endif + +#endif + +#if defined(__NEED_float_t) && !defined(__DEFINED_float_t) +typedef float float_t; +#define __DEFINED_float_t +#endif + +#if defined(__NEED_double_t) && !defined(__DEFINED_double_t) +typedef double double_t; +#define __DEFINED_double_t +#endif + + +#if defined(__NEED_max_align_t) && !defined(__DEFINED_max_align_t) +typedef struct { long long __ll; long double __ld; } max_align_t; +#define __DEFINED_max_align_t +#endif + +#define __LITTLE_ENDIAN 1234 +#define __BIG_ENDIAN 4321 +#define __USE_TIME_BITS64 1 + +#if defined(__NEED_size_t) && !defined(__DEFINED_size_t) +typedef unsigned _Addr size_t; +#define __DEFINED_size_t +#endif + +#if defined(__NEED_uintptr_t) && !defined(__DEFINED_uintptr_t) +typedef unsigned _Addr uintptr_t; +#define __DEFINED_uintptr_t +#endif + +#if defined(__NEED_ptrdiff_t) && !defined(__DEFINED_ptrdiff_t) +typedef _Addr ptrdiff_t; +#define __DEFINED_ptrdiff_t +#endif + +#if defined(__NEED_ssize_t) && !defined(__DEFINED_ssize_t) +typedef _Addr ssize_t; +#define __DEFINED_ssize_t +#endif + +#if defined(__NEED_intptr_t) && !defined(__DEFINED_intptr_t) +typedef _Addr intptr_t; +#define __DEFINED_intptr_t +#endif + +#if defined(__NEED_regoff_t) && !defined(__DEFINED_regoff_t) +typedef _Addr regoff_t; +#define __DEFINED_regoff_t +#endif + +#if defined(__NEED_register_t) && !defined(__DEFINED_register_t) +typedef _Reg register_t; +#define __DEFINED_register_t +#endif + +#if defined(__NEED_time_t) && !defined(__DEFINED_time_t) +typedef _Int64 time_t; +#define __DEFINED_time_t +#endif + +#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t) +typedef _Int64 suseconds_t; +#define __DEFINED_suseconds_t +#endif + + +#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t) +typedef signed char int8_t; +#define __DEFINED_int8_t +#endif + +#if defined(__NEED_int16_t) && !defined(__DEFINED_int16_t) +typedef signed short int16_t; +#define __DEFINED_int16_t +#endif + +#if defined(__NEED_int32_t) && !defined(__DEFINED_int32_t) +typedef signed int int32_t; +#define __DEFINED_int32_t +#endif + +#if defined(__NEED_int64_t) && !defined(__DEFINED_int64_t) +typedef signed _Int64 int64_t; +#define __DEFINED_int64_t +#endif + +#if defined(__NEED_intmax_t) && !defined(__DEFINED_intmax_t) +typedef signed _Int64 intmax_t; +#define __DEFINED_intmax_t +#endif + +#if defined(__NEED_uint8_t) && !defined(__DEFINED_uint8_t) +typedef unsigned char uint8_t; +#define __DEFINED_uint8_t +#endif + +#if defined(__NEED_uint16_t) && !defined(__DEFINED_uint16_t) +typedef unsigned short uint16_t; +#define __DEFINED_uint16_t +#endif + +#if defined(__NEED_uint32_t) && !defined(__DEFINED_uint32_t) +typedef unsigned int uint32_t; +#define __DEFINED_uint32_t +#endif + +#if defined(__NEED_uint64_t) && !defined(__DEFINED_uint64_t) +typedef unsigned _Int64 uint64_t; +#define __DEFINED_uint64_t +#endif + +#if defined(__NEED_u_int64_t) && !defined(__DEFINED_u_int64_t) +typedef unsigned _Int64 u_int64_t; +#define __DEFINED_u_int64_t +#endif + +#if defined(__NEED_uintmax_t) && !defined(__DEFINED_uintmax_t) +typedef unsigned _Int64 uintmax_t; +#define __DEFINED_uintmax_t +#endif + + +#if defined(__NEED_mode_t) && !defined(__DEFINED_mode_t) +typedef unsigned mode_t; +#define __DEFINED_mode_t +#endif + +#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t) +typedef unsigned _Reg nlink_t; +#define __DEFINED_nlink_t +#endif + +#if defined(__NEED_off_t) && !defined(__DEFINED_off_t) +typedef _Int64 off_t; +#define __DEFINED_off_t +#endif + +#if defined(__NEED_ino_t) && !defined(__DEFINED_ino_t) +typedef unsigned _Int64 ino_t; +#define __DEFINED_ino_t +#endif + +#if defined(__NEED_dev_t) && !defined(__DEFINED_dev_t) +typedef unsigned _Int64 dev_t; +#define __DEFINED_dev_t +#endif + +#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t) +typedef long blksize_t; +#define __DEFINED_blksize_t +#endif + +#if defined(__NEED_blkcnt_t) && !defined(__DEFINED_blkcnt_t) +typedef _Int64 blkcnt_t; +#define __DEFINED_blkcnt_t +#endif + +#if defined(__NEED_fsblkcnt_t) && !defined(__DEFINED_fsblkcnt_t) +typedef unsigned _Int64 fsblkcnt_t; +#define __DEFINED_fsblkcnt_t +#endif + +#if defined(__NEED_fsfilcnt_t) && !defined(__DEFINED_fsfilcnt_t) +typedef unsigned _Int64 fsfilcnt_t; +#define __DEFINED_fsfilcnt_t +#endif + + +#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t) +typedef unsigned wint_t; +#define __DEFINED_wint_t +#endif + +#if defined(__NEED_wctype_t) && !defined(__DEFINED_wctype_t) +typedef unsigned long wctype_t; +#define __DEFINED_wctype_t +#endif + + +#if defined(__NEED_timer_t) && !defined(__DEFINED_timer_t) +typedef void * timer_t; +#define __DEFINED_timer_t +#endif + +#if defined(__NEED_clockid_t) && !defined(__DEFINED_clockid_t) +typedef int clockid_t; +#define __DEFINED_clockid_t +#endif + +#if defined(__NEED_clock_t) && !defined(__DEFINED_clock_t) +typedef long clock_t; +#define __DEFINED_clock_t +#endif + +#if defined(__NEED_struct_timeval) && !defined(__DEFINED_struct_timeval) +struct timeval { time_t tv_sec; suseconds_t tv_usec; }; +#define __DEFINED_struct_timeval +#endif + +#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec) +struct timespec { time_t tv_sec; int :8*(sizeof(time_t)-sizeof(long))*(__BYTE_ORDER==4321); long tv_nsec; int :8*(sizeof(time_t)-sizeof(long))*(__BYTE_ORDER!=4321); }; +#define __DEFINED_struct_timespec +#endif + + +#if defined(__NEED_pid_t) && !defined(__DEFINED_pid_t) +typedef int pid_t; +#define __DEFINED_pid_t +#endif + +#if defined(__NEED_id_t) && !defined(__DEFINED_id_t) +typedef unsigned id_t; +#define __DEFINED_id_t +#endif + +#if defined(__NEED_uid_t) && !defined(__DEFINED_uid_t) +typedef unsigned uid_t; +#define __DEFINED_uid_t +#endif + +#if defined(__NEED_gid_t) && !defined(__DEFINED_gid_t) +typedef unsigned gid_t; +#define __DEFINED_gid_t +#endif + +#if defined(__NEED_key_t) && !defined(__DEFINED_key_t) +typedef int key_t; +#define __DEFINED_key_t +#endif + +#if defined(__NEED_useconds_t) && !defined(__DEFINED_useconds_t) +typedef unsigned useconds_t; +#define __DEFINED_useconds_t +#endif + + +#ifdef __cplusplus +#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t) +typedef unsigned long pthread_t; +#define __DEFINED_pthread_t +#endif + +#else +#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t) +typedef struct __pthread * pthread_t; +#define __DEFINED_pthread_t +#endif + +#endif +#if defined(__NEED_pthread_once_t) && !defined(__DEFINED_pthread_once_t) +typedef int pthread_once_t; +#define __DEFINED_pthread_once_t +#endif + +#if defined(__NEED_pthread_key_t) && !defined(__DEFINED_pthread_key_t) +typedef unsigned pthread_key_t; +#define __DEFINED_pthread_key_t +#endif + +#if defined(__NEED_pthread_spinlock_t) && !defined(__DEFINED_pthread_spinlock_t) +typedef int pthread_spinlock_t; +#define __DEFINED_pthread_spinlock_t +#endif + +#if defined(__NEED_pthread_mutexattr_t) && !defined(__DEFINED_pthread_mutexattr_t) +typedef struct { unsigned __attr; } pthread_mutexattr_t; +#define __DEFINED_pthread_mutexattr_t +#endif + +#if defined(__NEED_pthread_condattr_t) && !defined(__DEFINED_pthread_condattr_t) +typedef struct { unsigned __attr; } pthread_condattr_t; +#define __DEFINED_pthread_condattr_t +#endif + +#if defined(__NEED_pthread_barrierattr_t) && !defined(__DEFINED_pthread_barrierattr_t) +typedef struct { unsigned __attr; } pthread_barrierattr_t; +#define __DEFINED_pthread_barrierattr_t +#endif + +#if defined(__NEED_pthread_rwlockattr_t) && !defined(__DEFINED_pthread_rwlockattr_t) +typedef struct { unsigned __attr[2]; } pthread_rwlockattr_t; +#define __DEFINED_pthread_rwlockattr_t +#endif + + +#if defined(__NEED_struct__IO_FILE) && !defined(__DEFINED_struct__IO_FILE) +struct _IO_FILE { char __x; }; +#define __DEFINED_struct__IO_FILE +#endif + +#if defined(__NEED_FILE) && !defined(__DEFINED_FILE) +typedef struct _IO_FILE FILE; +#define __DEFINED_FILE +#endif + + +#if defined(__NEED_va_list) && !defined(__DEFINED_va_list) +typedef __builtin_va_list va_list; +#define __DEFINED_va_list +#endif + +#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list) +typedef __builtin_va_list __isoc_va_list; +#define __DEFINED___isoc_va_list +#endif + + +#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t) +typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t; +#define __DEFINED_mbstate_t +#endif + + +#if defined(__NEED_locale_t) && !defined(__DEFINED_locale_t) +typedef struct __locale_struct * locale_t; +#define __DEFINED_locale_t +#endif + + +#if defined(__NEED_sigset_t) && !defined(__DEFINED_sigset_t) +typedef struct __sigset_t { unsigned long __bits[128/sizeof(long)]; } sigset_t; +#define __DEFINED_sigset_t +#endif + + +#if defined(__NEED_struct_iovec) && !defined(__DEFINED_struct_iovec) +struct iovec { void *iov_base; size_t iov_len; }; +#define __DEFINED_struct_iovec +#endif + + +#if defined(__NEED_struct_winsize) && !defined(__DEFINED_struct_winsize) +struct winsize { unsigned short ws_row, ws_col, ws_xpixel, ws_ypixel; }; +#define __DEFINED_struct_winsize +#endif + + +#if defined(__NEED_socklen_t) && !defined(__DEFINED_socklen_t) +typedef unsigned socklen_t; +#define __DEFINED_socklen_t +#endif + +#if defined(__NEED_sa_family_t) && !defined(__DEFINED_sa_family_t) +typedef unsigned short sa_family_t; +#define __DEFINED_sa_family_t +#endif + + +#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t) +typedef struct { union { int __i[sizeof(long)==8?14:9]; volatile int __vi[sizeof(long)==8?14:9]; unsigned long __s[sizeof(long)==8?7:9]; } __u; } pthread_attr_t; +#define __DEFINED_pthread_attr_t +#endif + +#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t) +typedef struct { union { int __i[sizeof(long)==8?10:6]; volatile int __vi[sizeof(long)==8?10:6]; volatile void *volatile __p[sizeof(long)==8?5:6]; } __u; } pthread_mutex_t; +#define __DEFINED_pthread_mutex_t +#endif + +#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t) +typedef struct { union { int __i[sizeof(long)==8?10:6]; volatile int __vi[sizeof(long)==8?10:6]; volatile void *volatile __p[sizeof(long)==8?5:6]; } __u; } mtx_t; +#define __DEFINED_mtx_t +#endif + +#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t) +typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12*sizeof(int)/sizeof(void*)]; } __u; } pthread_cond_t; +#define __DEFINED_pthread_cond_t +#endif + +#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t) +typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12*sizeof(int)/sizeof(void*)]; } __u; } cnd_t; +#define __DEFINED_cnd_t +#endif + +#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t) +typedef struct { union { int __i[sizeof(long)==8?14:8]; volatile int __vi[sizeof(long)==8?14:8]; void *__p[sizeof(long)==8?7:8]; } __u; } pthread_rwlock_t; +#define __DEFINED_pthread_rwlock_t +#endif + +#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t) +typedef struct { union { int __i[sizeof(long)==8?8:5]; volatile int __vi[sizeof(long)==8?8:5]; void *__p[sizeof(long)==8?4:5]; } __u; } pthread_barrier_t; +#define __DEFINED_pthread_barrier_t +#endif + + +#undef _Addr +#undef _Int64 +#undef _Reg \ No newline at end of file diff --git a/lib/libc/include/generic-musl/bits/fenv.h b/lib/libc/include/generic-musl/bits/fenv.h index b260c6f63b..1347e5f2fe 100644 --- a/lib/libc/include/generic-musl/bits/fenv.h +++ b/lib/libc/include/generic-musl/bits/fenv.h @@ -1,17 +1,34 @@ -#define FE_INVALID 16 -#define FE_DIVBYZERO 8 -#define FE_OVERFLOW 4 -#define FE_UNDERFLOW 2 -#define FE_INEXACT 1 +#define FE_INVALID 1 +#define __FE_DENORM 2 +#define FE_DIVBYZERO 4 +#define FE_OVERFLOW 8 +#define FE_UNDERFLOW 16 +#define FE_INEXACT 32 -#define FE_ALL_EXCEPT 31 +#define FE_ALL_EXCEPT 63 -#define FE_TONEAREST 0 -#define FE_DOWNWARD 2 -#define FE_UPWARD 3 -#define FE_TOWARDZERO 1 +#define FE_TONEAREST 0 +#define FE_DOWNWARD 0x400 +#define FE_UPWARD 0x800 +#define FE_TOWARDZERO 0xc00 -typedef unsigned int fexcept_t; -typedef unsigned int fenv_t; +typedef unsigned short fexcept_t; + +typedef struct { + unsigned short __control_word; + unsigned short __unused1; + unsigned short __status_word; + unsigned short __unused2; + unsigned short __tags; + unsigned short __unused3; + unsigned int __eip; + unsigned short __cs_selector; + unsigned int __opcode:11; + unsigned int __unused4:5; + unsigned int __data_offset; + unsigned short __data_selector; + unsigned short __unused5; + unsigned int __mxcsr; +} fenv_t; #define FE_DFL_ENV ((const fenv_t *) -1) \ No newline at end of file diff --git a/lib/libc/include/generic-musl/bits/setjmp.h b/lib/libc/include/generic-musl/bits/setjmp.h new file mode 100644 index 0000000000..a7cb9dbc8b --- /dev/null +++ b/lib/libc/include/generic-musl/bits/setjmp.h @@ -0,0 +1 @@ +typedef unsigned long long __jmp_buf[23]; \ No newline at end of file diff --git a/lib/libc/include/generic-musl/bits/signal.h b/lib/libc/include/generic-musl/bits/signal.h new file mode 100644 index 0000000000..475aae6d68 --- /dev/null +++ b/lib/libc/include/generic-musl/bits/signal.h @@ -0,0 +1,142 @@ +#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ + || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) + +#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) +#define MINSIGSTKSZ 2048 +#define SIGSTKSZ 8192 +#endif + +#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) +typedef unsigned long long greg_t, gregset_t[32]; + +typedef struct { + union { + double fp_dregs[32]; + struct { + float _fp_fregs; + unsigned _fp_pad; + } fp_fregs[32]; + } fp_r; +} fpregset_t; + +struct sigcontext { + unsigned long long sc_regs[32]; + unsigned long long sc_fpregs[32]; + unsigned long long sc_mdhi; + unsigned long long sc_hi1; + unsigned long long sc_hi2; + unsigned long long sc_hi3; + unsigned long long sc_mdlo; + unsigned long long sc_lo1; + unsigned long long sc_lo2; + unsigned long long sc_lo3; + unsigned long long sc_pc; + unsigned int sc_fpc_csr; + unsigned int sc_used_math; + unsigned int sc_dsp; + unsigned int sc_reserved; +}; + +typedef struct { + gregset_t gregs; + fpregset_t fpregs; + greg_t mdhi; + greg_t hi1; + greg_t hi2; + greg_t hi3; + greg_t mdlo; + greg_t lo1; + greg_t lo2; + greg_t lo3; + greg_t pc; + unsigned int fpc_csr; + unsigned int used_math; + unsigned int dsp; + unsigned int reserved; +} mcontext_t; + +#else +typedef struct { + unsigned long long __mc1[32]; + double __mc2[32]; + unsigned long long __mc3[9]; + unsigned __mc4[4]; +} mcontext_t; +#endif + +struct sigaltstack { + void *ss_sp; + size_t ss_size; + int ss_flags; +}; + +typedef struct __ucontext { + unsigned long uc_flags; + struct __ucontext *uc_link; + stack_t uc_stack; + mcontext_t uc_mcontext; + sigset_t uc_sigmask; +} ucontext_t; + +#define SA_NOCLDSTOP 1 +#define SA_NOCLDWAIT 0x10000 +#define SA_SIGINFO 8 +#define SA_ONSTACK 0x08000000 +#define SA_RESTART 0x10000000 +#define SA_NODEFER 0x40000000 +#define SA_RESETHAND 0x80000000 + +#undef SIG_BLOCK +#undef SIG_UNBLOCK +#undef SIG_SETMASK +#define SIG_BLOCK 1 +#define SIG_UNBLOCK 2 +#define SIG_SETMASK 3 + +#undef SI_ASYNCIO +#undef SI_MESGQ +#undef SI_TIMER +#define SI_ASYNCIO (-2) +#define SI_MESGQ (-4) +#define SI_TIMER (-3) + +#define __SI_SWAP_ERRNO_CODE + +#endif + +#define SIGHUP 1 +#define SIGINT 2 +#define SIGQUIT 3 +#define SIGILL 4 +#define SIGTRAP 5 +#define SIGABRT 6 +#define SIGIOT SIGABRT +#define SIGEMT 7 +#define SIGFPE 8 +#define SIGKILL 9 +#define SIGBUS 10 +#define SIGSEGV 11 +#define SIGSYS 12 +#define SIGPIPE 13 +#define SIGALRM 14 +#define SIGTERM 15 +#define SIGUSR1 16 +#define SIGUSR2 17 +#define SIGCHLD 18 +#define SIGPWR 19 +#define SIGWINCH 20 +#define SIGURG 21 +#define SIGIO 22 +#define SIGPOLL SIGIO +#define SIGSTOP 23 +#define SIGTSTP 24 +#define SIGCONT 25 +#define SIGTTIN 26 +#define SIGTTOU 27 +#define SIGVTALRM 28 +#define SIGPROF 29 +#define SIGXCPU 30 +#define SIGXFSZ 31 +#define SIGUNUSED SIGSYS + +#define _NSIG 128 \ No newline at end of file diff --git a/lib/libc/include/generic-musl/bits/stdint.h b/lib/libc/include/generic-musl/bits/stdint.h index 02714d7398..b70a87dc9d 100644 --- a/lib/libc/include/generic-musl/bits/stdint.h +++ b/lib/libc/include/generic-musl/bits/stdint.h @@ -12,9 +12,9 @@ typedef uint32_t uint_fast32_t; #define UINT_FAST16_MAX UINT32_MAX #define UINT_FAST32_MAX UINT32_MAX -#define INTPTR_MIN INT64_MIN -#define INTPTR_MAX INT64_MAX -#define UINTPTR_MAX UINT64_MAX -#define PTRDIFF_MIN INT64_MIN -#define PTRDIFF_MAX INT64_MAX -#define SIZE_MAX UINT64_MAX \ No newline at end of file +#define INTPTR_MIN INT32_MIN +#define INTPTR_MAX INT32_MAX +#define UINTPTR_MAX UINT32_MAX +#define PTRDIFF_MIN INT32_MIN +#define PTRDIFF_MAX INT32_MAX +#define SIZE_MAX UINT32_MAX \ No newline at end of file diff --git a/lib/libc/include/loongarch64-linux-musl/bits/stdint.h b/lib/libc/include/loongarch64-linux-musl/bits/stdint.h new file mode 100644 index 0000000000..02714d7398 --- /dev/null +++ b/lib/libc/include/loongarch64-linux-musl/bits/stdint.h @@ -0,0 +1,20 @@ +typedef int32_t int_fast16_t; +typedef int32_t int_fast32_t; +typedef uint32_t uint_fast16_t; +typedef uint32_t uint_fast32_t; + +#define INT_FAST16_MIN INT32_MIN +#define INT_FAST32_MIN INT32_MIN + +#define INT_FAST16_MAX INT32_MAX +#define INT_FAST32_MAX INT32_MAX + +#define UINT_FAST16_MAX UINT32_MAX +#define UINT_FAST32_MAX UINT32_MAX + +#define INTPTR_MIN INT64_MIN +#define INTPTR_MAX INT64_MAX +#define UINTPTR_MAX UINT64_MAX +#define PTRDIFF_MIN INT64_MIN +#define PTRDIFF_MAX INT64_MAX +#define SIZE_MAX UINT64_MAX \ No newline at end of file diff --git a/lib/libc/include/mips64-linux-musl/bits/stdint.h b/lib/libc/include/mips64-linux-musl/bits/stdint.h new file mode 100644 index 0000000000..02714d7398 --- /dev/null +++ b/lib/libc/include/mips64-linux-musl/bits/stdint.h @@ -0,0 +1,20 @@ +typedef int32_t int_fast16_t; +typedef int32_t int_fast32_t; +typedef uint32_t uint_fast16_t; +typedef uint32_t uint_fast32_t; + +#define INT_FAST16_MIN INT32_MIN +#define INT_FAST32_MIN INT32_MIN + +#define INT_FAST16_MAX INT32_MAX +#define INT_FAST32_MAX INT32_MAX + +#define UINT_FAST16_MAX UINT32_MAX +#define UINT_FAST32_MAX UINT32_MAX + +#define INTPTR_MIN INT64_MIN +#define INTPTR_MAX INT64_MAX +#define UINTPTR_MAX UINT64_MAX +#define PTRDIFF_MIN INT64_MIN +#define PTRDIFF_MAX INT64_MAX +#define SIZE_MAX UINT64_MAX \ No newline at end of file diff --git a/lib/libc/include/mips64-linux-muslabin32/bits/errno.h b/lib/libc/include/mips64-linux-muslabin32/bits/errno.h new file mode 100644 index 0000000000..54adcccfee --- /dev/null +++ b/lib/libc/include/mips64-linux-muslabin32/bits/errno.h @@ -0,0 +1,134 @@ +#define EPERM 1 +#define ENOENT 2 +#define ESRCH 3 +#define EINTR 4 +#define EIO 5 +#define ENXIO 6 +#define E2BIG 7 +#define ENOEXEC 8 +#define EBADF 9 +#define ECHILD 10 +#define EAGAIN 11 +#define ENOMEM 12 +#define EACCES 13 +#define EFAULT 14 +#define ENOTBLK 15 +#define EBUSY 16 +#define EEXIST 17 +#define EXDEV 18 +#define ENODEV 19 +#define ENOTDIR 20 +#define EISDIR 21 +#define EINVAL 22 +#define ENFILE 23 +#define EMFILE 24 +#define ENOTTY 25 +#define ETXTBSY 26 +#define EFBIG 27 +#define ENOSPC 28 +#define ESPIPE 29 +#define EROFS 30 +#define EMLINK 31 +#define EPIPE 32 +#define EDOM 33 +#define ERANGE 34 +#define ENOMSG 35 +#define EIDRM 36 +#define ECHRNG 37 +#define EL2NSYNC 38 +#define EL3HLT 39 +#define EL3RST 40 +#define ELNRNG 41 +#define EUNATCH 42 +#define ENOCSI 43 +#define EL2HLT 44 +#define EDEADLK 45 +#define ENOLCK 46 +#define EBADE 50 +#define EBADR 51 +#define EXFULL 52 +#define ENOANO 53 +#define EBADRQC 54 +#define EBADSLT 55 +#define EDEADLOCK 56 +#define EBFONT 59 +#define ENOSTR 60 +#define ENODATA 61 +#define ETIME 62 +#define ENOSR 63 +#define ENONET 64 +#define ENOPKG 65 +#define EREMOTE 66 +#define ENOLINK 67 +#define EADV 68 +#define ESRMNT 69 +#define ECOMM 70 +#define EPROTO 71 +#define EDOTDOT 73 +#define EMULTIHOP 74 +#define EBADMSG 77 +#define ENAMETOOLONG 78 +#define EOVERFLOW 79 +#define ENOTUNIQ 80 +#define EBADFD 81 +#define EREMCHG 82 +#define ELIBACC 83 +#define ELIBBAD 84 +#define ELIBSCN 85 +#define ELIBMAX 86 +#define ELIBEXEC 87 +#define EILSEQ 88 +#define ENOSYS 89 +#define ELOOP 90 +#define ERESTART 91 +#define ESTRPIPE 92 +#define ENOTEMPTY 93 +#define EUSERS 94 +#define ENOTSOCK 95 +#define EDESTADDRREQ 96 +#define EMSGSIZE 97 +#define EPROTOTYPE 98 +#define ENOPROTOOPT 99 +#define EPROTONOSUPPORT 120 +#define ESOCKTNOSUPPORT 121 +#define EOPNOTSUPP 122 +#define ENOTSUP EOPNOTSUPP +#define EPFNOSUPPORT 123 +#define EAFNOSUPPORT 124 +#define EADDRINUSE 125 +#define EADDRNOTAVAIL 126 +#define ENETDOWN 127 +#define ENETUNREACH 128 +#define ENETRESET 129 +#define ECONNABORTED 130 +#define ECONNRESET 131 +#define ENOBUFS 132 +#define EISCONN 133 +#define ENOTCONN 134 +#define EUCLEAN 135 +#define ENOTNAM 137 +#define ENAVAIL 138 +#define EISNAM 139 +#define EREMOTEIO 140 +#define ESHUTDOWN 143 +#define ETOOMANYREFS 144 +#define ETIMEDOUT 145 +#define ECONNREFUSED 146 +#define EHOSTDOWN 147 +#define EHOSTUNREACH 148 +#define EWOULDBLOCK EAGAIN +#define EALREADY 149 +#define EINPROGRESS 150 +#define ESTALE 151 +#define ECANCELED 158 +#define ENOMEDIUM 159 +#define EMEDIUMTYPE 160 +#define ENOKEY 161 +#define EKEYEXPIRED 162 +#define EKEYREVOKED 163 +#define EKEYREJECTED 164 +#define EOWNERDEAD 165 +#define ENOTRECOVERABLE 166 +#define ERFKILL 167 +#define EHWPOISON 168 +#define EDQUOT 1133 \ No newline at end of file diff --git a/lib/libc/include/mips64-linux-muslabin32/bits/fcntl.h b/lib/libc/include/mips64-linux-muslabin32/bits/fcntl.h new file mode 100644 index 0000000000..911a8adc48 --- /dev/null +++ b/lib/libc/include/mips64-linux-muslabin32/bits/fcntl.h @@ -0,0 +1,40 @@ +#define O_CREAT 0400 +#define O_EXCL 02000 +#define O_NOCTTY 04000 +#define O_TRUNC 01000 +#define O_APPEND 0010 +#define O_NONBLOCK 0200 +#define O_DSYNC 0020 +#define O_SYNC 040020 +#define O_RSYNC 040020 +#define O_DIRECTORY 0200000 +#define O_NOFOLLOW 0400000 +#define O_CLOEXEC 02000000 + +#define O_ASYNC 010000 +#define O_DIRECT 0100000 +#define O_LARGEFILE 020000 +#define O_NOATIME 01000000 +#define O_PATH 010000000 +#define O_TMPFILE 020200000 +#define O_NDELAY O_NONBLOCK + +#define F_DUPFD 0 +#define F_GETFD 1 +#define F_SETFD 2 +#define F_GETFL 3 +#define F_SETFL 4 + +#define F_SETOWN 24 +#define F_GETOWN 23 +#define F_SETSIG 10 +#define F_GETSIG 11 + +#define F_GETLK 33 +#define F_SETLK 34 +#define F_SETLKW 35 + +#define F_SETOWN_EX 15 +#define F_GETOWN_EX 16 + +#define F_GETOWNER_UIDS 17 \ No newline at end of file diff --git a/lib/libc/include/mips64-linux-muslabin32/bits/fenv.h b/lib/libc/include/mips64-linux-muslabin32/bits/fenv.h new file mode 100644 index 0000000000..dbf9b368f1 --- /dev/null +++ b/lib/libc/include/mips64-linux-muslabin32/bits/fenv.h @@ -0,0 +1,25 @@ +#ifdef __mips_soft_float +#define FE_ALL_EXCEPT 0 +#define FE_TONEAREST 0 +#else +#define FE_INEXACT 4 +#define FE_UNDERFLOW 8 +#define FE_OVERFLOW 16 +#define FE_DIVBYZERO 32 +#define FE_INVALID 64 + +#define FE_ALL_EXCEPT 124 + +#define FE_TONEAREST 0 +#define FE_TOWARDZERO 1 +#define FE_UPWARD 2 +#define FE_DOWNWARD 3 +#endif + +typedef unsigned short fexcept_t; + +typedef struct { + unsigned __cw; +} fenv_t; + +#define FE_DFL_ENV ((const fenv_t *) -1) \ No newline at end of file diff --git a/lib/libc/include/mips64-linux-muslabin32/bits/hwcap.h b/lib/libc/include/mips64-linux-muslabin32/bits/hwcap.h new file mode 100644 index 0000000000..0cc1faa9f7 --- /dev/null +++ b/lib/libc/include/mips64-linux-muslabin32/bits/hwcap.h @@ -0,0 +1,3 @@ +#define HWCAP_MIPS_R6 (1 << 0) +#define HWCAP_MIPS_MSA (1 << 1) +#define HWCAP_MIPS_CRC32 (1 << 2) \ No newline at end of file diff --git a/lib/libc/include/mips64-linux-muslabin32/bits/ioctl.h b/lib/libc/include/mips64-linux-muslabin32/bits/ioctl.h new file mode 100644 index 0000000000..c4fbd0d8df --- /dev/null +++ b/lib/libc/include/mips64-linux-muslabin32/bits/ioctl.h @@ -0,0 +1,114 @@ +#define _IOC(a,b,c,d) ( ((a)<<29) | ((b)<<8) | (c) | ((d)<<16) ) +#define _IOC_NONE 1U +#define _IOC_READ 2U +#define _IOC_WRITE 4U + +#define _IO(a,b) _IOC(_IOC_NONE,(a),(b),0) +#define _IOW(a,b,c) _IOC(_IOC_WRITE,(a),(b),sizeof(c)) +#define _IOR(a,b,c) _IOC(_IOC_READ,(a),(b),sizeof(c)) +#define _IOWR(a,b,c) _IOC(_IOC_READ|_IOC_WRITE,(a),(b),sizeof(c)) + +#define TCGETA 0x5401 +#define TCSETA 0x5402 +#define TCSETAW 0x5403 +#define TCSETAF 0x5404 +#define TCSBRK 0x5405 +#define TCXONC 0x5406 +#define TCFLSH 0x5407 +#define TCGETS 0x540D +#define TCSETS 0x540E +#define TCSETSW 0x540F +#define TCSETSF 0x5410 + +#define TIOCEXCL 0x740D +#define TIOCNXCL 0x740E +#define TIOCOUTQ 0x7472 +#define TIOCSTI 0x5472 +#define TIOCMGET 0x741D +#define TIOCMBIS 0x741B +#define TIOCMBIC 0x741C +#define TIOCMSET 0x741A + +#define TIOCPKT 0x5470 +#define TIOCSWINSZ _IOW('t', 103, struct winsize) +#define TIOCGWINSZ _IOR('t', 104, struct winsize) +#define TIOCNOTTY 0x5471 +#define TIOCSETD 0x7401 +#define TIOCGETD 0x7400 + +#define FIOCLEX 0x6601 +#define FIONCLEX 0x6602 +#define FIOASYNC 0x667D +#define FIONBIO 0x667E +#define FIOQSIZE 0x667F + +#define TIOCGLTC 0x7474 +#define TIOCSLTC 0x7475 +#define TIOCSPGRP _IOW('t', 118, int) +#define TIOCGPGRP _IOR('t', 119, int) +#define TIOCCONS _IOW('t', 120, int) + +#define FIONREAD 0x467F +#define TIOCINQ FIONREAD + +#define TIOCGETP 0x7408 +#define TIOCSETP 0x7409 +#define TIOCSETN 0x740A + +#define TIOCSBRK 0x5427 +#define TIOCCBRK 0x5428 +#define TIOCGSID 0x7416 +#define TIOCGRS485 _IOR('T', 0x2E, char[32]) +#define TIOCSRS485 _IOWR('T', 0x2F, char[32]) +#define TIOCGPTN _IOR('T', 0x30, unsigned int) +#define TIOCSPTLCK _IOW('T', 0x31, int) +#define TIOCGDEV _IOR('T', 0x32, unsigned int) +#define TIOCSIG _IOW('T', 0x36, int) +#define TIOCVHANGUP 0x5437 +#define TIOCGPKT _IOR('T', 0x38, int) +#define TIOCGPTLCK _IOR('T', 0x39, int) +#define TIOCGEXCL _IOR('T', 0x40, int) +#define TIOCGPTPEER _IO('T', 0x41) + +#define TIOCSCTTY 0x5480 +#define TIOCGSOFTCAR 0x5481 +#define TIOCSSOFTCAR 0x5482 +#define TIOCLINUX 0x5483 +#define TIOCGSERIAL 0x5484 +#define TIOCSSERIAL 0x5485 +#define TCSBRKP 0x5486 + +#define TIOCSERCONFIG 0x5488 +#define TIOCSERGWILD 0x5489 +#define TIOCSERSWILD 0x548A +#define TIOCGLCKTRMIOS 0x548B +#define TIOCSLCKTRMIOS 0x548C +#define TIOCSERGSTRUCT 0x548D +#define TIOCSERGETLSR 0x548E +#define TIOCSERGETMULTI 0x548F +#define TIOCSERSETMULTI 0x5490 +#define TIOCMIWAIT 0x5491 +#define TIOCGICOUNT 0x5492 + +#define TIOCM_LE 0x001 +#define TIOCM_DTR 0x002 +#define TIOCM_RTS 0x004 +#define TIOCM_ST 0x010 +#define TIOCM_SR 0x020 +#define TIOCM_CTS 0x040 +#define TIOCM_CAR 0x100 +#define TIOCM_CD TIOCM_CAR +#define TIOCM_RNG 0x200 +#define TIOCM_RI TIOCM_RNG +#define TIOCM_DSR 0x400 +#define TIOCM_OUT1 0x2000 +#define TIOCM_OUT2 0x4000 +#define TIOCM_LOOP 0x8000 + +#define FIOGETOWN _IOR('f', 123, int) +#define FIOSETOWN _IOW('f', 124, int) +#define SIOCATMARK _IOR('s', 7, int) +#define SIOCSPGRP _IOW('s', 8, pid_t) +#define SIOCGPGRP _IOR('s', 9, pid_t) +#define SIOCGSTAMP _IOR(0x89, 6, char[16]) +#define SIOCGSTAMPNS _IOR(0x89, 7, char[16]) \ No newline at end of file diff --git a/lib/libc/include/mips64-linux-muslabin32/bits/ipcstat.h b/lib/libc/include/mips64-linux-muslabin32/bits/ipcstat.h new file mode 100644 index 0000000000..d055f3e837 --- /dev/null +++ b/lib/libc/include/mips64-linux-muslabin32/bits/ipcstat.h @@ -0,0 +1 @@ +#define IPC_STAT 0x102 \ No newline at end of file diff --git a/lib/libc/include/mips64-linux-muslabin32/bits/mman.h b/lib/libc/include/mips64-linux-muslabin32/bits/mman.h new file mode 100644 index 0000000000..54231d15a7 --- /dev/null +++ b/lib/libc/include/mips64-linux-muslabin32/bits/mman.h @@ -0,0 +1,25 @@ +#undef MAP_ANON +#define MAP_ANON 0x800 +#undef MAP_NORESERVE +#define MAP_NORESERVE 0x0400 +#undef MAP_GROWSDOWN +#define MAP_GROWSDOWN 0x1000 +#undef MAP_DENYWRITE +#define MAP_DENYWRITE 0x2000 +#undef MAP_EXECUTABLE +#define MAP_EXECUTABLE 0x4000 +#undef MAP_LOCKED +#define MAP_LOCKED 0x8000 +#undef MAP_POPULATE +#define MAP_POPULATE 0x10000 +#undef MAP_NONBLOCK +#define MAP_NONBLOCK 0x20000 +#undef MAP_STACK +#define MAP_STACK 0x40000 +#undef MAP_HUGETLB +#define MAP_HUGETLB 0x80000 +#undef MAP_SYNC + +#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) +#undef MADV_SOFT_OFFLINE +#endif \ No newline at end of file diff --git a/lib/libc/include/mips64-linux-muslabin32/bits/msg.h b/lib/libc/include/mips64-linux-muslabin32/bits/msg.h new file mode 100644 index 0000000000..9e428cabd5 --- /dev/null +++ b/lib/libc/include/mips64-linux-muslabin32/bits/msg.h @@ -0,0 +1,27 @@ +struct msqid_ds { + struct ipc_perm msg_perm; +#if _MIPSEL || __MIPSEL || __MIPSEL__ + unsigned long __msg_stime_lo; + unsigned long __msg_stime_hi; + unsigned long __msg_rtime_lo; + unsigned long __msg_rtime_hi; + unsigned long __msg_ctime_lo; + unsigned long __msg_ctime_hi; +#else + unsigned long __msg_stime_hi; + unsigned long __msg_stime_lo; + unsigned long __msg_rtime_hi; + unsigned long __msg_rtime_lo; + unsigned long __msg_ctime_hi; + unsigned long __msg_ctime_lo; +#endif + unsigned long msg_cbytes; + msgqnum_t msg_qnum; + msglen_t msg_qbytes; + pid_t msg_lspid; + pid_t msg_lrpid; + unsigned long __unused[2]; + time_t msg_stime; + time_t msg_rtime; + time_t msg_ctime; +}; \ No newline at end of file diff --git a/lib/libc/include/mips64-linux-muslabin32/bits/poll.h b/lib/libc/include/mips64-linux-muslabin32/bits/poll.h new file mode 100644 index 0000000000..cefdd9be80 --- /dev/null +++ b/lib/libc/include/mips64-linux-muslabin32/bits/poll.h @@ -0,0 +1,2 @@ +#define POLLWRNORM POLLOUT +#define POLLWRBAND 0x100 \ No newline at end of file diff --git a/lib/libc/include/mips64-linux-muslabin32/bits/ptrace.h b/lib/libc/include/mips64-linux-muslabin32/bits/ptrace.h new file mode 100644 index 0000000000..275462def0 --- /dev/null +++ b/lib/libc/include/mips64-linux-muslabin32/bits/ptrace.h @@ -0,0 +1,9 @@ +#define PTRACE_GET_THREAD_AREA 25 +#define PTRACE_SET_THREAD_AREA 26 +#define PTRACE_PEEKTEXT_3264 0xc0 +#define PTRACE_PEEKDATA_3264 0xc1 +#define PTRACE_POKETEXT_3264 0xc2 +#define PTRACE_POKEDATA_3264 0xc3 +#define PTRACE_GET_THREAD_AREA_3264 0xc4 +#define PTRACE_GET_WATCH_REGS 0xd0 +#define PTRACE_SET_WATCH_REGS 0xd1 \ No newline at end of file diff --git a/lib/libc/include/mips64-linux-muslabin32/bits/reg.h b/lib/libc/include/mips64-linux-muslabin32/bits/reg.h new file mode 100644 index 0000000000..e40c44d384 --- /dev/null +++ b/lib/libc/include/mips64-linux-muslabin32/bits/reg.h @@ -0,0 +1,47 @@ +#undef __WORDSIZE +#define __WORDSIZE 64 + +#define EF_R0 0 +#define EF_R1 1 +#define EF_R2 2 +#define EF_R3 3 +#define EF_R4 4 +#define EF_R5 5 +#define EF_R6 6 +#define EF_R7 7 +#define EF_R8 8 +#define EF_R9 9 +#define EF_R10 10 +#define EF_R11 11 +#define EF_R12 12 +#define EF_R13 13 +#define EF_R14 14 +#define EF_R15 15 +#define EF_R16 16 +#define EF_R17 17 +#define EF_R18 18 +#define EF_R19 19 +#define EF_R20 20 +#define EF_R21 21 +#define EF_R22 22 +#define EF_R23 23 +#define EF_R24 24 +#define EF_R25 25 + +#define EF_R26 26 +#define EF_R27 27 +#define EF_R28 28 +#define EF_R29 29 +#define EF_R30 30 +#define EF_R31 31 + +#define EF_LO 32 +#define EF_HI 33 + +#define EF_CP0_EPC 34 +#define EF_CP0_BADVADDR 35 +#define EF_CP0_STATUS 36 +#define EF_CP0_CAUSE 37 +#define EF_UNUSED0 38 + +#define EF_SIZE 304 \ No newline at end of file diff --git a/lib/libc/include/mips64-linux-muslabin32/bits/resource.h b/lib/libc/include/mips64-linux-muslabin32/bits/resource.h new file mode 100644 index 0000000000..ef7ada7cb1 --- /dev/null +++ b/lib/libc/include/mips64-linux-muslabin32/bits/resource.h @@ -0,0 +1,5 @@ +#define RLIMIT_NOFILE 5 +#define RLIMIT_AS 6 +#define RLIMIT_RSS 7 +#define RLIMIT_NPROC 8 +#define RLIMIT_MEMLOCK 9 \ No newline at end of file diff --git a/lib/libc/include/mips64-linux-muslabin32/bits/sem.h b/lib/libc/include/mips64-linux-muslabin32/bits/sem.h new file mode 100644 index 0000000000..87b05d488d --- /dev/null +++ b/lib/libc/include/mips64-linux-muslabin32/bits/sem.h @@ -0,0 +1,16 @@ +struct semid_ds { + struct ipc_perm sem_perm; + unsigned long __sem_otime_lo; + unsigned long __sem_ctime_lo; +#if __BYTE_ORDER == __LITTLE_ENDIAN + unsigned short sem_nsems; + char __sem_nsems_pad[sizeof(long)-sizeof(short)]; +#else + char __sem_nsems_pad[sizeof(long)-sizeof(short)]; + unsigned short sem_nsems; +#endif + unsigned long __sem_otime_hi; + unsigned long __sem_ctime_hi; + time_t sem_otime; + time_t sem_ctime; +}; \ No newline at end of file diff --git a/lib/libc/include/mips64-linux-muslabin32/bits/shm.h b/lib/libc/include/mips64-linux-muslabin32/bits/shm.h new file mode 100644 index 0000000000..4e5357d24f --- /dev/null +++ b/lib/libc/include/mips64-linux-muslabin32/bits/shm.h @@ -0,0 +1,29 @@ +#define SHMLBA 4096 + +struct shmid_ds { + struct ipc_perm shm_perm; + size_t shm_segsz; + unsigned long __shm_atime_lo; + unsigned long __shm_dtime_lo; + unsigned long __shm_ctime_lo; + pid_t shm_cpid; + pid_t shm_lpid; + unsigned long shm_nattch; + unsigned short __shm_atime_hi; + unsigned short __shm_dtime_hi; + unsigned short __shm_ctime_hi; + unsigned short __pad1; + time_t shm_atime; + time_t shm_dtime; + time_t shm_ctime; +}; + +struct shminfo { + unsigned long shmmax, shmmin, shmmni, shmseg, shmall, __unused[4]; +}; + +struct shm_info { + int __used_ids; + unsigned long shm_tot, shm_rss, shm_swp; + unsigned long __swap_attempts, __swap_successes; +}; \ No newline at end of file diff --git a/lib/libc/include/mips64-linux-muslabin32/bits/socket.h b/lib/libc/include/mips64-linux-muslabin32/bits/socket.h new file mode 100644 index 0000000000..751f71fc47 --- /dev/null +++ b/lib/libc/include/mips64-linux-muslabin32/bits/socket.h @@ -0,0 +1,35 @@ +#define SOCK_STREAM 2 +#define SOCK_DGRAM 1 + +#define SOL_SOCKET 65535 + +#define SO_DEBUG 1 + +#define SO_REUSEADDR 0x0004 +#define SO_KEEPALIVE 0x0008 +#define SO_DONTROUTE 0x0010 +#define SO_BROADCAST 0x0020 +#define SO_LINGER 0x0080 +#define SO_OOBINLINE 0x0100 +#define SO_REUSEPORT 0x0200 +#define SO_SNDBUF 0x1001 +#define SO_RCVBUF 0x1002 +#define SO_SNDLOWAT 0x1003 +#define SO_RCVLOWAT 0x1004 +#define SO_ERROR 0x1007 +#define SO_TYPE 0x1008 +#define SO_ACCEPTCONN 0x1009 +#define SO_PROTOCOL 0x1028 +#define SO_DOMAIN 0x1029 + +#define SO_NO_CHECK 11 +#define SO_PRIORITY 12 +#define SO_BSDCOMPAT 14 +#define SO_PASSCRED 17 +#define SO_PEERCRED 18 +#define SO_PEERSEC 30 +#define SO_SNDBUFFORCE 31 +#define SO_RCVBUFFORCE 33 + +#define SOCK_NONBLOCK 0200 +#define SOCK_CLOEXEC 02000000 \ No newline at end of file diff --git a/lib/libc/include/mips64-linux-muslabin32/bits/stat.h b/lib/libc/include/mips64-linux-muslabin32/bits/stat.h new file mode 100644 index 0000000000..31dcbd46cb --- /dev/null +++ b/lib/libc/include/mips64-linux-muslabin32/bits/stat.h @@ -0,0 +1,23 @@ +struct stat { + dev_t st_dev; + long __pad1[2]; + ino_t st_ino; + mode_t st_mode; + nlink_t st_nlink; + uid_t st_uid; + gid_t st_gid; + dev_t st_rdev; + long __pad2[2]; + off_t st_size; + struct { + long tv_sec; + long tv_nsec; + } __st_atim32, __st_mtim32, __st_ctim32; + blksize_t st_blksize; + long __pad3; + blkcnt_t st_blocks; + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; + long __pad4[2]; +}; \ No newline at end of file diff --git a/lib/libc/include/mips64-linux-muslabin32/bits/statfs.h b/lib/libc/include/mips64-linux-muslabin32/bits/statfs.h new file mode 100644 index 0000000000..8fdd34ef66 --- /dev/null +++ b/lib/libc/include/mips64-linux-muslabin32/bits/statfs.h @@ -0,0 +1,8 @@ +struct statfs { + unsigned long f_type, f_bsize, f_frsize; + fsblkcnt_t f_blocks, f_bfree; + fsfilcnt_t f_files, f_ffree; + fsblkcnt_t f_bavail; + fsid_t f_fsid; + unsigned long f_namelen, f_flags, f_spare[5]; +}; \ No newline at end of file diff --git a/lib/libc/include/mips64-linux-muslabin32/bits/syscall.h b/lib/libc/include/mips64-linux-muslabin32/bits/syscall.h new file mode 100644 index 0000000000..2fa9aa090f --- /dev/null +++ b/lib/libc/include/mips64-linux-muslabin32/bits/syscall.h @@ -0,0 +1,759 @@ +#define __NR_read 6000 +#define __NR_write 6001 +#define __NR_open 6002 +#define __NR_close 6003 +#define __NR_stat 6004 +#define __NR_fstat 6005 +#define __NR_lstat 6006 +#define __NR_poll 6007 +#define __NR_lseek 6008 +#define __NR_mmap 6009 +#define __NR_mprotect 6010 +#define __NR_munmap 6011 +#define __NR_brk 6012 +#define __NR_rt_sigaction 6013 +#define __NR_rt_sigprocmask 6014 +#define __NR_ioctl 6015 +#define __NR_pread64 6016 +#define __NR_pwrite64 6017 +#define __NR_readv 6018 +#define __NR_writev 6019 +#define __NR_access 6020 +#define __NR_pipe 6021 +#define __NR__newselect 6022 +#define __NR_sched_yield 6023 +#define __NR_mremap 6024 +#define __NR_msync 6025 +#define __NR_mincore 6026 +#define __NR_madvise 6027 +#define __NR_shmget 6028 +#define __NR_shmat 6029 +#define __NR_shmctl 6030 +#define __NR_dup 6031 +#define __NR_dup2 6032 +#define __NR_pause 6033 +#define __NR_nanosleep 6034 +#define __NR_getitimer 6035 +#define __NR_setitimer 6036 +#define __NR_alarm 6037 +#define __NR_getpid 6038 +#define __NR_sendfile 6039 +#define __NR_socket 6040 +#define __NR_connect 6041 +#define __NR_accept 6042 +#define __NR_sendto 6043 +#define __NR_recvfrom 6044 +#define __NR_sendmsg 6045 +#define __NR_recvmsg 6046 +#define __NR_shutdown 6047 +#define __NR_bind 6048 +#define __NR_listen 6049 +#define __NR_getsockname 6050 +#define __NR_getpeername 6051 +#define __NR_socketpair 6052 +#define __NR_setsockopt 6053 +#define __NR_getsockopt 6054 +#define __NR_clone 6055 +#define __NR_fork 6056 +#define __NR_execve 6057 +#define __NR_exit 6058 +#define __NR_wait4 6059 +#define __NR_kill 6060 +#define __NR_uname 6061 +#define __NR_semget 6062 +#define __NR_semop 6063 +#define __NR_semctl 6064 +#define __NR_shmdt 6065 +#define __NR_msgget 6066 +#define __NR_msgsnd 6067 +#define __NR_msgrcv 6068 +#define __NR_msgctl 6069 +#define __NR_fcntl 6070 +#define __NR_flock 6071 +#define __NR_fsync 6072 +#define __NR_fdatasync 6073 +#define __NR_truncate 6074 +#define __NR_ftruncate 6075 +#define __NR_getdents 6076 +#define __NR_getcwd 6077 +#define __NR_chdir 6078 +#define __NR_fchdir 6079 +#define __NR_rename 6080 +#define __NR_mkdir 6081 +#define __NR_rmdir 6082 +#define __NR_creat 6083 +#define __NR_link 6084 +#define __NR_unlink 6085 +#define __NR_symlink 6086 +#define __NR_readlink 6087 +#define __NR_chmod 6088 +#define __NR_fchmod 6089 +#define __NR_chown 6090 +#define __NR_fchown 6091 +#define __NR_lchown 6092 +#define __NR_umask 6093 +#define __NR_gettimeofday_time32 6094 +#define __NR_getrlimit 6095 +#define __NR_getrusage 6096 +#define __NR_sysinfo 6097 +#define __NR_times 6098 +#define __NR_ptrace 6099 +#define __NR_getuid 6100 +#define __NR_syslog 6101 +#define __NR_getgid 6102 +#define __NR_setuid 6103 +#define __NR_setgid 6104 +#define __NR_geteuid 6105 +#define __NR_getegid 6106 +#define __NR_setpgid 6107 +#define __NR_getppid 6108 +#define __NR_getpgrp 6109 +#define __NR_setsid 6110 +#define __NR_setreuid 6111 +#define __NR_setregid 6112 +#define __NR_getgroups 6113 +#define __NR_setgroups 6114 +#define __NR_setresuid 6115 +#define __NR_getresuid 6116 +#define __NR_setresgid 6117 +#define __NR_getresgid 6118 +#define __NR_getpgid 6119 +#define __NR_setfsuid 6120 +#define __NR_setfsgid 6121 +#define __NR_getsid 6122 +#define __NR_capget 6123 +#define __NR_capset 6124 +#define __NR_rt_sigpending 6125 +#define __NR_rt_sigtimedwait 6126 +#define __NR_rt_sigqueueinfo 6127 +#define __NR_rt_sigsuspend 6128 +#define __NR_sigaltstack 6129 +#define __NR_utime 6130 +#define __NR_mknod 6131 +#define __NR_personality 6132 +#define __NR_ustat 6133 +#define __NR_statfs 6134 +#define __NR_fstatfs 6135 +#define __NR_sysfs 6136 +#define __NR_getpriority 6137 +#define __NR_setpriority 6138 +#define __NR_sched_setparam 6139 +#define __NR_sched_getparam 6140 +#define __NR_sched_setscheduler 6141 +#define __NR_sched_getscheduler 6142 +#define __NR_sched_get_priority_max 6143 +#define __NR_sched_get_priority_min 6144 +#define __NR_sched_rr_get_interval 6145 +#define __NR_mlock 6146 +#define __NR_munlock 6147 +#define __NR_mlockall 6148 +#define __NR_munlockall 6149 +#define __NR_vhangup 6150 +#define __NR_pivot_root 6151 +#define __NR__sysctl 6152 +#define __NR_prctl 6153 +#define __NR_adjtimex 6154 +#define __NR_setrlimit 6155 +#define __NR_chroot 6156 +#define __NR_sync 6157 +#define __NR_acct 6158 +#define __NR_settimeofday_time32 6159 +#define __NR_mount 6160 +#define __NR_umount2 6161 +#define __NR_swapon 6162 +#define __NR_swapoff 6163 +#define __NR_reboot 6164 +#define __NR_sethostname 6165 +#define __NR_setdomainname 6166 +#define __NR_create_module 6167 +#define __NR_init_module 6168 +#define __NR_delete_module 6169 +#define __NR_get_kernel_syms 6170 +#define __NR_query_module 6171 +#define __NR_quotactl 6172 +#define __NR_nfsservctl 6173 +#define __NR_getpmsg 6174 +#define __NR_putpmsg 6175 +#define __NR_afs_syscall 6176 +#define __NR_reserved177 6177 +#define __NR_gettid 6178 +#define __NR_readahead 6179 +#define __NR_setxattr 6180 +#define __NR_lsetxattr 6181 +#define __NR_fsetxattr 6182 +#define __NR_getxattr 6183 +#define __NR_lgetxattr 6184 +#define __NR_fgetxattr 6185 +#define __NR_listxattr 6186 +#define __NR_llistxattr 6187 +#define __NR_flistxattr 6188 +#define __NR_removexattr 6189 +#define __NR_lremovexattr 6190 +#define __NR_fremovexattr 6191 +#define __NR_tkill 6192 +#define __NR_reserved193 6193 +#define __NR_futex 6194 +#define __NR_sched_setaffinity 6195 +#define __NR_sched_getaffinity 6196 +#define __NR_cacheflush 6197 +#define __NR_cachectl 6198 +#define __NR_sysmips 6199 +#define __NR_io_setup 6200 +#define __NR_io_destroy 6201 +#define __NR_io_getevents 6202 +#define __NR_io_submit 6203 +#define __NR_io_cancel 6204 +#define __NR_exit_group 6205 +#define __NR_lookup_dcookie 6206 +#define __NR_epoll_create 6207 +#define __NR_epoll_ctl 6208 +#define __NR_epoll_wait 6209 +#define __NR_remap_file_pages 6210 +#define __NR_rt_sigreturn 6211 +#define __NR_fcntl64 6212 +#define __NR_set_tid_address 6213 +#define __NR_restart_syscall 6214 +#define __NR_semtimedop 6215 +#define __NR_fadvise64 6216 +#define __NR_statfs64 6217 +#define __NR_fstatfs64 6218 +#define __NR_sendfile64 6219 +#define __NR_timer_create 6220 +#define __NR_timer_settime32 6221 +#define __NR_timer_gettime32 6222 +#define __NR_timer_getoverrun 6223 +#define __NR_timer_delete 6224 +#define __NR_clock_settime32 6225 +#define __NR_clock_gettime32 6226 +#define __NR_clock_getres_time32 6227 +#define __NR_clock_nanosleep_time32 6228 +#define __NR_tgkill 6229 +#define __NR_utimes 6230 +#define __NR_mbind 6231 +#define __NR_get_mempolicy 6232 +#define __NR_set_mempolicy 6233 +#define __NR_mq_open 6234 +#define __NR_mq_unlink 6235 +#define __NR_mq_timedsend 6236 +#define __NR_mq_timedreceive 6237 +#define __NR_mq_notify 6238 +#define __NR_mq_getsetattr 6239 +#define __NR_vserver 6240 +#define __NR_waitid 6241 +#define __NR_add_key 6243 +#define __NR_request_key 6244 +#define __NR_keyctl 6245 +#define __NR_set_thread_area 6246 +#define __NR_inotify_init 6247 +#define __NR_inotify_add_watch 6248 +#define __NR_inotify_rm_watch 6249 +#define __NR_migrate_pages 6250 +#define __NR_openat 6251 +#define __NR_mkdirat 6252 +#define __NR_mknodat 6253 +#define __NR_fchownat 6254 +#define __NR_futimesat 6255 +#define __NR_newfstatat 6256 +#define __NR_unlinkat 6257 +#define __NR_renameat 6258 +#define __NR_linkat 6259 +#define __NR_symlinkat 6260 +#define __NR_readlinkat 6261 +#define __NR_fchmodat 6262 +#define __NR_faccessat 6263 +#define __NR_pselect6 6264 +#define __NR_ppoll 6265 +#define __NR_unshare 6266 +#define __NR_splice 6267 +#define __NR_sync_file_range 6268 +#define __NR_tee 6269 +#define __NR_vmsplice 6270 +#define __NR_move_pages 6271 +#define __NR_set_robust_list 6272 +#define __NR_get_robust_list 6273 +#define __NR_kexec_load 6274 +#define __NR_getcpu 6275 +#define __NR_epoll_pwait 6276 +#define __NR_ioprio_set 6277 +#define __NR_ioprio_get 6278 +#define __NR_utimensat 6279 +#define __NR_signalfd 6280 +#define __NR_timerfd 6281 +#define __NR_eventfd 6282 +#define __NR_fallocate 6283 +#define __NR_timerfd_create 6284 +#define __NR_timerfd_gettime32 6285 +#define __NR_timerfd_settime32 6286 +#define __NR_signalfd4 6287 +#define __NR_eventfd2 6288 +#define __NR_epoll_create1 6289 +#define __NR_dup3 6290 +#define __NR_pipe2 6291 +#define __NR_inotify_init1 6292 +#define __NR_preadv 6293 +#define __NR_pwritev 6294 +#define __NR_rt_tgsigqueueinfo 6295 +#define __NR_perf_event_open 6296 +#define __NR_accept4 6297 +#define __NR_recvmmsg 6298 +#define __NR_getdents64 6299 +#define __NR_fanotify_init 6300 +#define __NR_fanotify_mark 6301 +#define __NR_prlimit64 6302 +#define __NR_name_to_handle_at 6303 +#define __NR_open_by_handle_at 6304 +#define __NR_clock_adjtime 6305 +#define __NR_syncfs 6306 +#define __NR_sendmmsg 6307 +#define __NR_setns 6308 +#define __NR_process_vm_readv 6309 +#define __NR_process_vm_writev 6310 +#define __NR_kcmp 6311 +#define __NR_finit_module 6312 +#define __NR_sched_setattr 6313 +#define __NR_sched_getattr 6314 +#define __NR_renameat2 6315 +#define __NR_seccomp 6316 +#define __NR_getrandom 6317 +#define __NR_memfd_create 6318 +#define __NR_bpf 6319 +#define __NR_execveat 6320 +#define __NR_userfaultfd 6321 +#define __NR_membarrier 6322 +#define __NR_mlock2 6323 +#define __NR_copy_file_range 6324 +#define __NR_preadv2 6325 +#define __NR_pwritev2 6326 +#define __NR_pkey_mprotect 6327 +#define __NR_pkey_alloc 6328 +#define __NR_pkey_free 6329 +#define __NR_statx 6330 +#define __NR_rseq 6331 +#define __NR_io_pgetevents 6332 +#define __NR_clock_gettime64 6403 +#define __NR_clock_settime64 6404 +#define __NR_clock_adjtime64 6405 +#define __NR_clock_getres_time64 6406 +#define __NR_clock_nanosleep_time64 6407 +#define __NR_timer_gettime64 6408 +#define __NR_timer_settime64 6409 +#define __NR_timerfd_gettime64 6410 +#define __NR_timerfd_settime64 6411 +#define __NR_utimensat_time64 6412 +#define __NR_pselect6_time64 6413 +#define __NR_ppoll_time64 6414 +#define __NR_io_pgetevents_time64 6416 +#define __NR_recvmmsg_time64 6417 +#define __NR_mq_timedsend_time64 6418 +#define __NR_mq_timedreceive_time64 6419 +#define __NR_semtimedop_time64 6420 +#define __NR_rt_sigtimedwait_time64 6421 +#define __NR_futex_time64 6422 +#define __NR_sched_rr_get_interval_time64 6423 +#define __NR_pidfd_send_signal 6424 +#define __NR_io_uring_setup 6425 +#define __NR_io_uring_enter 6426 +#define __NR_io_uring_register 6427 +#define __NR_open_tree 6428 +#define __NR_move_mount 6429 +#define __NR_fsopen 6430 +#define __NR_fsconfig 6431 +#define __NR_fsmount 6432 +#define __NR_fspick 6433 +#define __NR_pidfd_open 6434 +#define __NR_clone3 6435 +#define __NR_close_range 6436 +#define __NR_openat2 6437 +#define __NR_pidfd_getfd 6438 +#define __NR_faccessat2 6439 +#define __NR_process_madvise 6440 +#define __NR_epoll_pwait2 6441 +#define __NR_mount_setattr 6442 +#define __NR_landlock_create_ruleset 6444 +#define __NR_landlock_add_rule 6445 +#define __NR_landlock_restrict_self 6446 +#define __NR_process_mrelease 6448 +#define __NR_futex_waitv 6449 +#define __NR_set_mempolicy_home_node 6450 +#define __NR_cachestat 6451 +#define __NR_fchmodat2 6452 + +#define SYS_read 6000 +#define SYS_write 6001 +#define SYS_open 6002 +#define SYS_close 6003 +#define SYS_stat 6004 +#define SYS_fstat 6005 +#define SYS_lstat 6006 +#define SYS_poll 6007 +#define SYS_lseek 6008 +#define SYS_mmap 6009 +#define SYS_mprotect 6010 +#define SYS_munmap 6011 +#define SYS_brk 6012 +#define SYS_rt_sigaction 6013 +#define SYS_rt_sigprocmask 6014 +#define SYS_ioctl 6015 +#define SYS_pread64 6016 +#define SYS_pwrite64 6017 +#define SYS_readv 6018 +#define SYS_writev 6019 +#define SYS_access 6020 +#define SYS_pipe 6021 +#define SYS__newselect 6022 +#define SYS_sched_yield 6023 +#define SYS_mremap 6024 +#define SYS_msync 6025 +#define SYS_mincore 6026 +#define SYS_madvise 6027 +#define SYS_shmget 6028 +#define SYS_shmat 6029 +#define SYS_shmctl 6030 +#define SYS_dup 6031 +#define SYS_dup2 6032 +#define SYS_pause 6033 +#define SYS_nanosleep 6034 +#define SYS_getitimer 6035 +#define SYS_setitimer 6036 +#define SYS_alarm 6037 +#define SYS_getpid 6038 +#define SYS_sendfile 6039 +#define SYS_socket 6040 +#define SYS_connect 6041 +#define SYS_accept 6042 +#define SYS_sendto 6043 +#define SYS_recvfrom 6044 +#define SYS_sendmsg 6045 +#define SYS_recvmsg 6046 +#define SYS_shutdown 6047 +#define SYS_bind 6048 +#define SYS_listen 6049 +#define SYS_getsockname 6050 +#define SYS_getpeername 6051 +#define SYS_socketpair 6052 +#define SYS_setsockopt 6053 +#define SYS_getsockopt 6054 +#define SYS_clone 6055 +#define SYS_fork 6056 +#define SYS_execve 6057 +#define SYS_exit 6058 +#define SYS_wait4 6059 +#define SYS_kill 6060 +#define SYS_uname 6061 +#define SYS_semget 6062 +#define SYS_semop 6063 +#define SYS_semctl 6064 +#define SYS_shmdt 6065 +#define SYS_msgget 6066 +#define SYS_msgsnd 6067 +#define SYS_msgrcv 6068 +#define SYS_msgctl 6069 +#define SYS_fcntl 6070 +#define SYS_flock 6071 +#define SYS_fsync 6072 +#define SYS_fdatasync 6073 +#define SYS_truncate 6074 +#define SYS_ftruncate 6075 +#define SYS_getdents 6076 +#define SYS_getcwd 6077 +#define SYS_chdir 6078 +#define SYS_fchdir 6079 +#define SYS_rename 6080 +#define SYS_mkdir 6081 +#define SYS_rmdir 6082 +#define SYS_creat 6083 +#define SYS_link 6084 +#define SYS_unlink 6085 +#define SYS_symlink 6086 +#define SYS_readlink 6087 +#define SYS_chmod 6088 +#define SYS_fchmod 6089 +#define SYS_chown 6090 +#define SYS_fchown 6091 +#define SYS_lchown 6092 +#define SYS_umask 6093 +#define SYS_gettimeofday_time32 6094 +#define SYS_getrlimit 6095 +#define SYS_getrusage 6096 +#define SYS_sysinfo 6097 +#define SYS_times 6098 +#define SYS_ptrace 6099 +#define SYS_getuid 6100 +#define SYS_syslog 6101 +#define SYS_getgid 6102 +#define SYS_setuid 6103 +#define SYS_setgid 6104 +#define SYS_geteuid 6105 +#define SYS_getegid 6106 +#define SYS_setpgid 6107 +#define SYS_getppid 6108 +#define SYS_getpgrp 6109 +#define SYS_setsid 6110 +#define SYS_setreuid 6111 +#define SYS_setregid 6112 +#define SYS_getgroups 6113 +#define SYS_setgroups 6114 +#define SYS_setresuid 6115 +#define SYS_getresuid 6116 +#define SYS_setresgid 6117 +#define SYS_getresgid 6118 +#define SYS_getpgid 6119 +#define SYS_setfsuid 6120 +#define SYS_setfsgid 6121 +#define SYS_getsid 6122 +#define SYS_capget 6123 +#define SYS_capset 6124 +#define SYS_rt_sigpending 6125 +#define SYS_rt_sigtimedwait 6126 +#define SYS_rt_sigqueueinfo 6127 +#define SYS_rt_sigsuspend 6128 +#define SYS_sigaltstack 6129 +#define SYS_utime 6130 +#define SYS_mknod 6131 +#define SYS_personality 6132 +#define SYS_ustat 6133 +#define SYS_statfs 6134 +#define SYS_fstatfs 6135 +#define SYS_sysfs 6136 +#define SYS_getpriority 6137 +#define SYS_setpriority 6138 +#define SYS_sched_setparam 6139 +#define SYS_sched_getparam 6140 +#define SYS_sched_setscheduler 6141 +#define SYS_sched_getscheduler 6142 +#define SYS_sched_get_priority_max 6143 +#define SYS_sched_get_priority_min 6144 +#define SYS_sched_rr_get_interval 6145 +#define SYS_mlock 6146 +#define SYS_munlock 6147 +#define SYS_mlockall 6148 +#define SYS_munlockall 6149 +#define SYS_vhangup 6150 +#define SYS_pivot_root 6151 +#define SYS__sysctl 6152 +#define SYS_prctl 6153 +#define SYS_adjtimex 6154 +#define SYS_setrlimit 6155 +#define SYS_chroot 6156 +#define SYS_sync 6157 +#define SYS_acct 6158 +#define SYS_settimeofday_time32 6159 +#define SYS_mount 6160 +#define SYS_umount2 6161 +#define SYS_swapon 6162 +#define SYS_swapoff 6163 +#define SYS_reboot 6164 +#define SYS_sethostname 6165 +#define SYS_setdomainname 6166 +#define SYS_create_module 6167 +#define SYS_init_module 6168 +#define SYS_delete_module 6169 +#define SYS_get_kernel_syms 6170 +#define SYS_query_module 6171 +#define SYS_quotactl 6172 +#define SYS_nfsservctl 6173 +#define SYS_getpmsg 6174 +#define SYS_putpmsg 6175 +#define SYS_afs_syscall 6176 +#define SYS_reserved177 6177 +#define SYS_gettid 6178 +#define SYS_readahead 6179 +#define SYS_setxattr 6180 +#define SYS_lsetxattr 6181 +#define SYS_fsetxattr 6182 +#define SYS_getxattr 6183 +#define SYS_lgetxattr 6184 +#define SYS_fgetxattr 6185 +#define SYS_listxattr 6186 +#define SYS_llistxattr 6187 +#define SYS_flistxattr 6188 +#define SYS_removexattr 6189 +#define SYS_lremovexattr 6190 +#define SYS_fremovexattr 6191 +#define SYS_tkill 6192 +#define SYS_reserved193 6193 +#define SYS_futex 6194 +#define SYS_sched_setaffinity 6195 +#define SYS_sched_getaffinity 6196 +#define SYS_cacheflush 6197 +#define SYS_cachectl 6198 +#define SYS_sysmips 6199 +#define SYS_io_setup 6200 +#define SYS_io_destroy 6201 +#define SYS_io_getevents 6202 +#define SYS_io_submit 6203 +#define SYS_io_cancel 6204 +#define SYS_exit_group 6205 +#define SYS_lookup_dcookie 6206 +#define SYS_epoll_create 6207 +#define SYS_epoll_ctl 6208 +#define SYS_epoll_wait 6209 +#define SYS_remap_file_pages 6210 +#define SYS_rt_sigreturn 6211 +#define SYS_fcntl64 6212 +#define SYS_set_tid_address 6213 +#define SYS_restart_syscall 6214 +#define SYS_semtimedop 6215 +#define SYS_fadvise64 6216 +#define SYS_statfs64 6217 +#define SYS_fstatfs64 6218 +#define SYS_sendfile64 6219 +#define SYS_timer_create 6220 +#define SYS_timer_settime32 6221 +#define SYS_timer_gettime32 6222 +#define SYS_timer_getoverrun 6223 +#define SYS_timer_delete 6224 +#define SYS_clock_settime32 6225 +#define SYS_clock_gettime32 6226 +#define SYS_clock_getres_time32 6227 +#define SYS_clock_nanosleep_time32 6228 +#define SYS_tgkill 6229 +#define SYS_utimes 6230 +#define SYS_mbind 6231 +#define SYS_get_mempolicy 6232 +#define SYS_set_mempolicy 6233 +#define SYS_mq_open 6234 +#define SYS_mq_unlink 6235 +#define SYS_mq_timedsend 6236 +#define SYS_mq_timedreceive 6237 +#define SYS_mq_notify 6238 +#define SYS_mq_getsetattr 6239 +#define SYS_vserver 6240 +#define SYS_waitid 6241 +#define SYS_add_key 6243 +#define SYS_request_key 6244 +#define SYS_keyctl 6245 +#define SYS_set_thread_area 6246 +#define SYS_inotify_init 6247 +#define SYS_inotify_add_watch 6248 +#define SYS_inotify_rm_watch 6249 +#define SYS_migrate_pages 6250 +#define SYS_openat 6251 +#define SYS_mkdirat 6252 +#define SYS_mknodat 6253 +#define SYS_fchownat 6254 +#define SYS_futimesat 6255 +#define SYS_newfstatat 6256 +#define SYS_unlinkat 6257 +#define SYS_renameat 6258 +#define SYS_linkat 6259 +#define SYS_symlinkat 6260 +#define SYS_readlinkat 6261 +#define SYS_fchmodat 6262 +#define SYS_faccessat 6263 +#define SYS_pselect6 6264 +#define SYS_ppoll 6265 +#define SYS_unshare 6266 +#define SYS_splice 6267 +#define SYS_sync_file_range 6268 +#define SYS_tee 6269 +#define SYS_vmsplice 6270 +#define SYS_move_pages 6271 +#define SYS_set_robust_list 6272 +#define SYS_get_robust_list 6273 +#define SYS_kexec_load 6274 +#define SYS_getcpu 6275 +#define SYS_epoll_pwait 6276 +#define SYS_ioprio_set 6277 +#define SYS_ioprio_get 6278 +#define SYS_utimensat 6279 +#define SYS_signalfd 6280 +#define SYS_timerfd 6281 +#define SYS_eventfd 6282 +#define SYS_fallocate 6283 +#define SYS_timerfd_create 6284 +#define SYS_timerfd_gettime32 6285 +#define SYS_timerfd_settime32 6286 +#define SYS_signalfd4 6287 +#define SYS_eventfd2 6288 +#define SYS_epoll_create1 6289 +#define SYS_dup3 6290 +#define SYS_pipe2 6291 +#define SYS_inotify_init1 6292 +#define SYS_preadv 6293 +#define SYS_pwritev 6294 +#define SYS_rt_tgsigqueueinfo 6295 +#define SYS_perf_event_open 6296 +#define SYS_accept4 6297 +#define SYS_recvmmsg 6298 +#define SYS_getdents64 6299 +#define SYS_fanotify_init 6300 +#define SYS_fanotify_mark 6301 +#define SYS_prlimit64 6302 +#define SYS_name_to_handle_at 6303 +#define SYS_open_by_handle_at 6304 +#define SYS_clock_adjtime 6305 +#define SYS_syncfs 6306 +#define SYS_sendmmsg 6307 +#define SYS_setns 6308 +#define SYS_process_vm_readv 6309 +#define SYS_process_vm_writev 6310 +#define SYS_kcmp 6311 +#define SYS_finit_module 6312 +#define SYS_sched_setattr 6313 +#define SYS_sched_getattr 6314 +#define SYS_renameat2 6315 +#define SYS_seccomp 6316 +#define SYS_getrandom 6317 +#define SYS_memfd_create 6318 +#define SYS_bpf 6319 +#define SYS_execveat 6320 +#define SYS_userfaultfd 6321 +#define SYS_membarrier 6322 +#define SYS_mlock2 6323 +#define SYS_copy_file_range 6324 +#define SYS_preadv2 6325 +#define SYS_pwritev2 6326 +#define SYS_pkey_mprotect 6327 +#define SYS_pkey_alloc 6328 +#define SYS_pkey_free 6329 +#define SYS_statx 6330 +#define SYS_rseq 6331 +#define SYS_io_pgetevents 6332 +#define SYS_clock_gettime64 6403 +#define SYS_clock_settime64 6404 +#define SYS_clock_adjtime64 6405 +#define SYS_clock_getres_time64 6406 +#define SYS_clock_nanosleep_time64 6407 +#define SYS_timer_gettime64 6408 +#define SYS_timer_settime64 6409 +#define SYS_timerfd_gettime64 6410 +#define SYS_timerfd_settime64 6411 +#define SYS_utimensat_time64 6412 +#define SYS_pselect6_time64 6413 +#define SYS_ppoll_time64 6414 +#define SYS_io_pgetevents_time64 6416 +#define SYS_recvmmsg_time64 6417 +#define SYS_mq_timedsend_time64 6418 +#define SYS_mq_timedreceive_time64 6419 +#define SYS_semtimedop_time64 6420 +#define SYS_rt_sigtimedwait_time64 6421 +#define SYS_futex_time64 6422 +#define SYS_sched_rr_get_interval_time64 6423 +#define SYS_pidfd_send_signal 6424 +#define SYS_io_uring_setup 6425 +#define SYS_io_uring_enter 6426 +#define SYS_io_uring_register 6427 +#define SYS_open_tree 6428 +#define SYS_move_mount 6429 +#define SYS_fsopen 6430 +#define SYS_fsconfig 6431 +#define SYS_fsmount 6432 +#define SYS_fspick 6433 +#define SYS_pidfd_open 6434 +#define SYS_clone3 6435 +#define SYS_close_range 6436 +#define SYS_openat2 6437 +#define SYS_pidfd_getfd 6438 +#define SYS_faccessat2 6439 +#define SYS_process_madvise 6440 +#define SYS_epoll_pwait2 6441 +#define SYS_mount_setattr 6442 +#define SYS_landlock_create_ruleset 6444 +#define SYS_landlock_add_rule 6445 +#define SYS_landlock_restrict_self 6446 +#define SYS_process_mrelease 6448 +#define SYS_futex_waitv 6449 +#define SYS_set_mempolicy_home_node 6450 +#define SYS_cachestat 6451 +#define SYS_fchmodat2 6452 \ No newline at end of file diff --git a/lib/libc/include/mips64-linux-muslabin32/bits/termios.h b/lib/libc/include/mips64-linux-muslabin32/bits/termios.h new file mode 100644 index 0000000000..0940ce20fb --- /dev/null +++ b/lib/libc/include/mips64-linux-muslabin32/bits/termios.h @@ -0,0 +1,169 @@ +struct termios { + tcflag_t c_iflag; + tcflag_t c_oflag; + tcflag_t c_cflag; + tcflag_t c_lflag; + cc_t c_line; + cc_t c_cc[NCCS]; + speed_t __c_ispeed; + speed_t __c_ospeed; +}; + +#define VINTR 0 +#define VQUIT 1 +#define VERASE 2 +#define VKILL 3 +#define VMIN 4 +#define VTIME 5 +#define VEOL2 6 +#define VSWTC 7 +#define VSWTCH 7 +#define VSTART 8 +#define VSTOP 9 +#define VSUSP 10 +#define VREPRINT 12 +#define VDISCARD 13 +#define VWERASE 14 +#define VLNEXT 15 +#define VEOF 16 +#define VEOL 17 + +#define IGNBRK 0000001 +#define BRKINT 0000002 +#define IGNPAR 0000004 +#define PARMRK 0000010 +#define INPCK 0000020 +#define ISTRIP 0000040 +#define INLCR 0000100 +#define IGNCR 0000200 +#define ICRNL 0000400 +#define IUCLC 0001000 +#define IXON 0002000 +#define IXANY 0004000 +#define IXOFF 0010000 +#define IMAXBEL 0020000 +#define IUTF8 0040000 + +#define OPOST 0000001 +#define OLCUC 0000002 +#define ONLCR 0000004 +#define OCRNL 0000010 +#define ONOCR 0000020 +#define ONLRET 0000040 +#define OFILL 0000100 +#define OFDEL 0000200 +#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) || defined(_XOPEN_SOURCE) +#define NLDLY 0000400 +#define NL0 0000000 +#define NL1 0000400 +#define CRDLY 0003000 +#define CR0 0000000 +#define CR1 0001000 +#define CR2 0002000 +#define CR3 0003000 +#define TABDLY 0014000 +#define TAB0 0000000 +#define TAB1 0004000 +#define TAB2 0010000 +#define TAB3 0014000 +#define BSDLY 0020000 +#define BS0 0000000 +#define BS1 0020000 +#define FFDLY 0100000 +#define FF0 0000000 +#define FF1 0100000 +#endif + +#define VTDLY 0040000 +#define VT0 0000000 +#define VT1 0040000 + +#define B0 0000000 +#define B50 0000001 +#define B75 0000002 +#define B110 0000003 +#define B134 0000004 +#define B150 0000005 +#define B200 0000006 +#define B300 0000007 +#define B600 0000010 +#define B1200 0000011 +#define B1800 0000012 +#define B2400 0000013 +#define B4800 0000014 +#define B9600 0000015 +#define B19200 0000016 +#define B38400 0000017 + +#define B57600 0010001 +#define B115200 0010002 +#define B230400 0010003 +#define B460800 0010004 +#define B500000 0010005 +#define B576000 0010006 +#define B921600 0010007 +#define B1000000 0010010 +#define B1152000 0010011 +#define B1500000 0010012 +#define B2000000 0010013 +#define B2500000 0010014 +#define B3000000 0010015 +#define B3500000 0010016 +#define B4000000 0010017 + +#define CSIZE 0000060 +#define CS5 0000000 +#define CS6 0000020 +#define CS7 0000040 +#define CS8 0000060 +#define CSTOPB 0000100 +#define CREAD 0000200 +#define PARENB 0000400 +#define PARODD 0001000 +#define HUPCL 0002000 +#define CLOCAL 0004000 + +#define ISIG 0000001 +#define ICANON 0000002 +#define ECHO 0000010 +#define ECHOE 0000020 +#define ECHOK 0000040 +#define ECHONL 0000100 +#define NOFLSH 0000200 +#define IEXTEN 0000400 +#define TOSTOP 0100000 +#define ITOSTOP 0100000 + +#define TCOOFF 0 +#define TCOON 1 +#define TCIOFF 2 +#define TCION 3 + +#define TCIFLUSH 0 +#define TCOFLUSH 1 +#define TCIOFLUSH 2 + +#define TCSANOW 0 +#define TCSADRAIN 1 +#define TCSAFLUSH 2 + +#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) +#define EXTA 0000016 +#define EXTB 0000017 +#define CBAUD 0010017 +#define CBAUDEX 0010000 +#define CIBAUD 002003600000 +#define CMSPAR 010000000000 +#define CRTSCTS 020000000000 + +#define XCASE 0000004 +#define ECHOCTL 0001000 +#define ECHOPRT 0002000 +#define ECHOKE 0004000 +#define FLUSHO 0020000 +#define PENDIN 0040000 +#define EXTPROC 0200000 + +#define XTABS 0014000 +#define TIOCSER_TEMT 1 +#endif \ No newline at end of file diff --git a/lib/libc/include/mips64-linux-muslabin32/bits/user.h b/lib/libc/include/mips64-linux-muslabin32/bits/user.h new file mode 100644 index 0000000000..0c2b245fee --- /dev/null +++ b/lib/libc/include/mips64-linux-muslabin32/bits/user.h @@ -0,0 +1,15 @@ +struct user { + unsigned long regs[102]; + unsigned long u_tsize, u_dsize, u_ssize; + unsigned long long start_code, start_data, start_stack; + long long signal; + unsigned long long *u_ar0; + unsigned long long magic; + char u_comm[32]; +}; + +#define ELF_NGREG 45 +#define ELF_NFPREG 33 + +typedef unsigned long elf_greg_t, elf_gregset_t[ELF_NGREG]; +typedef double elf_fpreg_t, elf_fpregset_t[ELF_NFPREG]; \ No newline at end of file diff --git a/lib/libc/include/powerpc64-linux-musl/bits/stdint.h b/lib/libc/include/powerpc64-linux-musl/bits/stdint.h new file mode 100644 index 0000000000..02714d7398 --- /dev/null +++ b/lib/libc/include/powerpc64-linux-musl/bits/stdint.h @@ -0,0 +1,20 @@ +typedef int32_t int_fast16_t; +typedef int32_t int_fast32_t; +typedef uint32_t uint_fast16_t; +typedef uint32_t uint_fast32_t; + +#define INT_FAST16_MIN INT32_MIN +#define INT_FAST32_MIN INT32_MIN + +#define INT_FAST16_MAX INT32_MAX +#define INT_FAST32_MAX INT32_MAX + +#define UINT_FAST16_MAX UINT32_MAX +#define UINT_FAST32_MAX UINT32_MAX + +#define INTPTR_MIN INT64_MIN +#define INTPTR_MAX INT64_MAX +#define UINTPTR_MAX UINT64_MAX +#define PTRDIFF_MIN INT64_MIN +#define PTRDIFF_MAX INT64_MAX +#define SIZE_MAX UINT64_MAX \ No newline at end of file diff --git a/lib/libc/include/riscv32-linux-musl/bits/fenv.h b/lib/libc/include/riscv32-linux-musl/bits/fenv.h new file mode 100644 index 0000000000..b260c6f63b --- /dev/null +++ b/lib/libc/include/riscv32-linux-musl/bits/fenv.h @@ -0,0 +1,17 @@ +#define FE_INVALID 16 +#define FE_DIVBYZERO 8 +#define FE_OVERFLOW 4 +#define FE_UNDERFLOW 2 +#define FE_INEXACT 1 + +#define FE_ALL_EXCEPT 31 + +#define FE_TONEAREST 0 +#define FE_DOWNWARD 2 +#define FE_UPWARD 3 +#define FE_TOWARDZERO 1 + +typedef unsigned int fexcept_t; +typedef unsigned int fenv_t; + +#define FE_DFL_ENV ((const fenv_t *) -1) \ No newline at end of file diff --git a/lib/libc/include/riscv64-linux-musl/bits/fenv.h b/lib/libc/include/riscv64-linux-musl/bits/fenv.h new file mode 100644 index 0000000000..b260c6f63b --- /dev/null +++ b/lib/libc/include/riscv64-linux-musl/bits/fenv.h @@ -0,0 +1,17 @@ +#define FE_INVALID 16 +#define FE_DIVBYZERO 8 +#define FE_OVERFLOW 4 +#define FE_UNDERFLOW 2 +#define FE_INEXACT 1 + +#define FE_ALL_EXCEPT 31 + +#define FE_TONEAREST 0 +#define FE_DOWNWARD 2 +#define FE_UPWARD 3 +#define FE_TOWARDZERO 1 + +typedef unsigned int fexcept_t; +typedef unsigned int fenv_t; + +#define FE_DFL_ENV ((const fenv_t *) -1) \ No newline at end of file diff --git a/lib/libc/include/riscv64-linux-musl/bits/stdint.h b/lib/libc/include/riscv64-linux-musl/bits/stdint.h new file mode 100644 index 0000000000..02714d7398 --- /dev/null +++ b/lib/libc/include/riscv64-linux-musl/bits/stdint.h @@ -0,0 +1,20 @@ +typedef int32_t int_fast16_t; +typedef int32_t int_fast32_t; +typedef uint32_t uint_fast16_t; +typedef uint32_t uint_fast32_t; + +#define INT_FAST16_MIN INT32_MIN +#define INT_FAST32_MIN INT32_MIN + +#define INT_FAST16_MAX INT32_MAX +#define INT_FAST32_MAX INT32_MAX + +#define UINT_FAST16_MAX UINT32_MAX +#define UINT_FAST32_MAX UINT32_MAX + +#define INTPTR_MIN INT64_MIN +#define INTPTR_MAX INT64_MAX +#define UINTPTR_MAX UINT64_MAX +#define PTRDIFF_MIN INT64_MIN +#define PTRDIFF_MAX INT64_MAX +#define SIZE_MAX UINT64_MAX \ No newline at end of file diff --git a/lib/libc/include/s390x-linux-musl/bits/stdint.h b/lib/libc/include/s390x-linux-musl/bits/stdint.h new file mode 100644 index 0000000000..02714d7398 --- /dev/null +++ b/lib/libc/include/s390x-linux-musl/bits/stdint.h @@ -0,0 +1,20 @@ +typedef int32_t int_fast16_t; +typedef int32_t int_fast32_t; +typedef uint32_t uint_fast16_t; +typedef uint32_t uint_fast32_t; + +#define INT_FAST16_MIN INT32_MIN +#define INT_FAST32_MIN INT32_MIN + +#define INT_FAST16_MAX INT32_MAX +#define INT_FAST32_MAX INT32_MAX + +#define UINT_FAST16_MAX UINT32_MAX +#define UINT_FAST32_MAX UINT32_MAX + +#define INTPTR_MIN INT64_MIN +#define INTPTR_MAX INT64_MAX +#define UINTPTR_MAX UINT64_MAX +#define PTRDIFF_MIN INT64_MIN +#define PTRDIFF_MAX INT64_MAX +#define SIZE_MAX UINT64_MAX \ No newline at end of file diff --git a/lib/libc/include/x86_64-linux-musl/bits/stdint.h b/lib/libc/include/x86_64-linux-musl/bits/stdint.h new file mode 100644 index 0000000000..02714d7398 --- /dev/null +++ b/lib/libc/include/x86_64-linux-musl/bits/stdint.h @@ -0,0 +1,20 @@ +typedef int32_t int_fast16_t; +typedef int32_t int_fast32_t; +typedef uint32_t uint_fast16_t; +typedef uint32_t uint_fast32_t; + +#define INT_FAST16_MIN INT32_MIN +#define INT_FAST32_MIN INT32_MIN + +#define INT_FAST16_MAX INT32_MAX +#define INT_FAST32_MAX INT32_MAX + +#define UINT_FAST16_MAX UINT32_MAX +#define UINT_FAST32_MAX UINT32_MAX + +#define INTPTR_MIN INT64_MIN +#define INTPTR_MAX INT64_MAX +#define UINTPTR_MAX UINT64_MAX +#define PTRDIFF_MIN INT64_MIN +#define PTRDIFF_MAX INT64_MAX +#define SIZE_MAX UINT64_MAX \ No newline at end of file diff --git a/lib/libc/include/x86_64-linux-muslx32/bits/alltypes.h b/lib/libc/include/x86_64-linux-muslx32/bits/alltypes.h new file mode 100644 index 0000000000..8dfc0bcf9d --- /dev/null +++ b/lib/libc/include/x86_64-linux-muslx32/bits/alltypes.h @@ -0,0 +1,423 @@ +#define _Addr int +#define _Int64 long long +#define _Reg long long + +#define __BYTE_ORDER 1234 +#define __LONG_MAX 0x7fffffffL + +#ifndef __cplusplus +#ifdef __WCHAR_TYPE__ +#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t) +typedef __WCHAR_TYPE__ wchar_t; +#define __DEFINED_wchar_t +#endif + +#else +#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t) +typedef long wchar_t; +#define __DEFINED_wchar_t +#endif + +#endif +#endif + +#if defined(__FLT_EVAL_METHOD__) && __FLT_EVAL_METHOD__ == 2 +#if defined(__NEED_float_t) && !defined(__DEFINED_float_t) +typedef long double float_t; +#define __DEFINED_float_t +#endif + +#if defined(__NEED_double_t) && !defined(__DEFINED_double_t) +typedef long double double_t; +#define __DEFINED_double_t +#endif + +#else +#if defined(__NEED_float_t) && !defined(__DEFINED_float_t) +typedef float float_t; +#define __DEFINED_float_t +#endif + +#if defined(__NEED_double_t) && !defined(__DEFINED_double_t) +typedef double double_t; +#define __DEFINED_double_t +#endif + +#endif + +#if defined(__NEED_max_align_t) && !defined(__DEFINED_max_align_t) +typedef struct { long long __ll; long double __ld; } max_align_t; +#define __DEFINED_max_align_t +#endif + +#define __LITTLE_ENDIAN 1234 +#define __BIG_ENDIAN 4321 +#define __USE_TIME_BITS64 1 + +#if defined(__NEED_size_t) && !defined(__DEFINED_size_t) +typedef unsigned _Addr size_t; +#define __DEFINED_size_t +#endif + +#if defined(__NEED_uintptr_t) && !defined(__DEFINED_uintptr_t) +typedef unsigned _Addr uintptr_t; +#define __DEFINED_uintptr_t +#endif + +#if defined(__NEED_ptrdiff_t) && !defined(__DEFINED_ptrdiff_t) +typedef _Addr ptrdiff_t; +#define __DEFINED_ptrdiff_t +#endif + +#if defined(__NEED_ssize_t) && !defined(__DEFINED_ssize_t) +typedef _Addr ssize_t; +#define __DEFINED_ssize_t +#endif + +#if defined(__NEED_intptr_t) && !defined(__DEFINED_intptr_t) +typedef _Addr intptr_t; +#define __DEFINED_intptr_t +#endif + +#if defined(__NEED_regoff_t) && !defined(__DEFINED_regoff_t) +typedef _Addr regoff_t; +#define __DEFINED_regoff_t +#endif + +#if defined(__NEED_register_t) && !defined(__DEFINED_register_t) +typedef _Reg register_t; +#define __DEFINED_register_t +#endif + +#if defined(__NEED_time_t) && !defined(__DEFINED_time_t) +typedef _Int64 time_t; +#define __DEFINED_time_t +#endif + +#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t) +typedef _Int64 suseconds_t; +#define __DEFINED_suseconds_t +#endif + + +#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t) +typedef signed char int8_t; +#define __DEFINED_int8_t +#endif + +#if defined(__NEED_int16_t) && !defined(__DEFINED_int16_t) +typedef signed short int16_t; +#define __DEFINED_int16_t +#endif + +#if defined(__NEED_int32_t) && !defined(__DEFINED_int32_t) +typedef signed int int32_t; +#define __DEFINED_int32_t +#endif + +#if defined(__NEED_int64_t) && !defined(__DEFINED_int64_t) +typedef signed _Int64 int64_t; +#define __DEFINED_int64_t +#endif + +#if defined(__NEED_intmax_t) && !defined(__DEFINED_intmax_t) +typedef signed _Int64 intmax_t; +#define __DEFINED_intmax_t +#endif + +#if defined(__NEED_uint8_t) && !defined(__DEFINED_uint8_t) +typedef unsigned char uint8_t; +#define __DEFINED_uint8_t +#endif + +#if defined(__NEED_uint16_t) && !defined(__DEFINED_uint16_t) +typedef unsigned short uint16_t; +#define __DEFINED_uint16_t +#endif + +#if defined(__NEED_uint32_t) && !defined(__DEFINED_uint32_t) +typedef unsigned int uint32_t; +#define __DEFINED_uint32_t +#endif + +#if defined(__NEED_uint64_t) && !defined(__DEFINED_uint64_t) +typedef unsigned _Int64 uint64_t; +#define __DEFINED_uint64_t +#endif + +#if defined(__NEED_u_int64_t) && !defined(__DEFINED_u_int64_t) +typedef unsigned _Int64 u_int64_t; +#define __DEFINED_u_int64_t +#endif + +#if defined(__NEED_uintmax_t) && !defined(__DEFINED_uintmax_t) +typedef unsigned _Int64 uintmax_t; +#define __DEFINED_uintmax_t +#endif + + +#if defined(__NEED_mode_t) && !defined(__DEFINED_mode_t) +typedef unsigned mode_t; +#define __DEFINED_mode_t +#endif + +#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t) +typedef unsigned _Reg nlink_t; +#define __DEFINED_nlink_t +#endif + +#if defined(__NEED_off_t) && !defined(__DEFINED_off_t) +typedef _Int64 off_t; +#define __DEFINED_off_t +#endif + +#if defined(__NEED_ino_t) && !defined(__DEFINED_ino_t) +typedef unsigned _Int64 ino_t; +#define __DEFINED_ino_t +#endif + +#if defined(__NEED_dev_t) && !defined(__DEFINED_dev_t) +typedef unsigned _Int64 dev_t; +#define __DEFINED_dev_t +#endif + +#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t) +typedef long blksize_t; +#define __DEFINED_blksize_t +#endif + +#if defined(__NEED_blkcnt_t) && !defined(__DEFINED_blkcnt_t) +typedef _Int64 blkcnt_t; +#define __DEFINED_blkcnt_t +#endif + +#if defined(__NEED_fsblkcnt_t) && !defined(__DEFINED_fsblkcnt_t) +typedef unsigned _Int64 fsblkcnt_t; +#define __DEFINED_fsblkcnt_t +#endif + +#if defined(__NEED_fsfilcnt_t) && !defined(__DEFINED_fsfilcnt_t) +typedef unsigned _Int64 fsfilcnt_t; +#define __DEFINED_fsfilcnt_t +#endif + + +#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t) +typedef unsigned wint_t; +#define __DEFINED_wint_t +#endif + +#if defined(__NEED_wctype_t) && !defined(__DEFINED_wctype_t) +typedef unsigned long wctype_t; +#define __DEFINED_wctype_t +#endif + + +#if defined(__NEED_timer_t) && !defined(__DEFINED_timer_t) +typedef void * timer_t; +#define __DEFINED_timer_t +#endif + +#if defined(__NEED_clockid_t) && !defined(__DEFINED_clockid_t) +typedef int clockid_t; +#define __DEFINED_clockid_t +#endif + +#if defined(__NEED_clock_t) && !defined(__DEFINED_clock_t) +typedef long clock_t; +#define __DEFINED_clock_t +#endif + +#if defined(__NEED_struct_timeval) && !defined(__DEFINED_struct_timeval) +struct timeval { time_t tv_sec; suseconds_t tv_usec; }; +#define __DEFINED_struct_timeval +#endif + +#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec) +struct timespec { time_t tv_sec; int :8*(sizeof(time_t)-sizeof(long))*(__BYTE_ORDER==4321); long tv_nsec; int :8*(sizeof(time_t)-sizeof(long))*(__BYTE_ORDER!=4321); }; +#define __DEFINED_struct_timespec +#endif + + +#if defined(__NEED_pid_t) && !defined(__DEFINED_pid_t) +typedef int pid_t; +#define __DEFINED_pid_t +#endif + +#if defined(__NEED_id_t) && !defined(__DEFINED_id_t) +typedef unsigned id_t; +#define __DEFINED_id_t +#endif + +#if defined(__NEED_uid_t) && !defined(__DEFINED_uid_t) +typedef unsigned uid_t; +#define __DEFINED_uid_t +#endif + +#if defined(__NEED_gid_t) && !defined(__DEFINED_gid_t) +typedef unsigned gid_t; +#define __DEFINED_gid_t +#endif + +#if defined(__NEED_key_t) && !defined(__DEFINED_key_t) +typedef int key_t; +#define __DEFINED_key_t +#endif + +#if defined(__NEED_useconds_t) && !defined(__DEFINED_useconds_t) +typedef unsigned useconds_t; +#define __DEFINED_useconds_t +#endif + + +#ifdef __cplusplus +#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t) +typedef unsigned long pthread_t; +#define __DEFINED_pthread_t +#endif + +#else +#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t) +typedef struct __pthread * pthread_t; +#define __DEFINED_pthread_t +#endif + +#endif +#if defined(__NEED_pthread_once_t) && !defined(__DEFINED_pthread_once_t) +typedef int pthread_once_t; +#define __DEFINED_pthread_once_t +#endif + +#if defined(__NEED_pthread_key_t) && !defined(__DEFINED_pthread_key_t) +typedef unsigned pthread_key_t; +#define __DEFINED_pthread_key_t +#endif + +#if defined(__NEED_pthread_spinlock_t) && !defined(__DEFINED_pthread_spinlock_t) +typedef int pthread_spinlock_t; +#define __DEFINED_pthread_spinlock_t +#endif + +#if defined(__NEED_pthread_mutexattr_t) && !defined(__DEFINED_pthread_mutexattr_t) +typedef struct { unsigned __attr; } pthread_mutexattr_t; +#define __DEFINED_pthread_mutexattr_t +#endif + +#if defined(__NEED_pthread_condattr_t) && !defined(__DEFINED_pthread_condattr_t) +typedef struct { unsigned __attr; } pthread_condattr_t; +#define __DEFINED_pthread_condattr_t +#endif + +#if defined(__NEED_pthread_barrierattr_t) && !defined(__DEFINED_pthread_barrierattr_t) +typedef struct { unsigned __attr; } pthread_barrierattr_t; +#define __DEFINED_pthread_barrierattr_t +#endif + +#if defined(__NEED_pthread_rwlockattr_t) && !defined(__DEFINED_pthread_rwlockattr_t) +typedef struct { unsigned __attr[2]; } pthread_rwlockattr_t; +#define __DEFINED_pthread_rwlockattr_t +#endif + + +#if defined(__NEED_struct__IO_FILE) && !defined(__DEFINED_struct__IO_FILE) +struct _IO_FILE { char __x; }; +#define __DEFINED_struct__IO_FILE +#endif + +#if defined(__NEED_FILE) && !defined(__DEFINED_FILE) +typedef struct _IO_FILE FILE; +#define __DEFINED_FILE +#endif + + +#if defined(__NEED_va_list) && !defined(__DEFINED_va_list) +typedef __builtin_va_list va_list; +#define __DEFINED_va_list +#endif + +#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list) +typedef __builtin_va_list __isoc_va_list; +#define __DEFINED___isoc_va_list +#endif + + +#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t) +typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t; +#define __DEFINED_mbstate_t +#endif + + +#if defined(__NEED_locale_t) && !defined(__DEFINED_locale_t) +typedef struct __locale_struct * locale_t; +#define __DEFINED_locale_t +#endif + + +#if defined(__NEED_sigset_t) && !defined(__DEFINED_sigset_t) +typedef struct __sigset_t { unsigned long __bits[128/sizeof(long)]; } sigset_t; +#define __DEFINED_sigset_t +#endif + + +#if defined(__NEED_struct_iovec) && !defined(__DEFINED_struct_iovec) +struct iovec { void *iov_base; size_t iov_len; }; +#define __DEFINED_struct_iovec +#endif + + +#if defined(__NEED_struct_winsize) && !defined(__DEFINED_struct_winsize) +struct winsize { unsigned short ws_row, ws_col, ws_xpixel, ws_ypixel; }; +#define __DEFINED_struct_winsize +#endif + + +#if defined(__NEED_socklen_t) && !defined(__DEFINED_socklen_t) +typedef unsigned socklen_t; +#define __DEFINED_socklen_t +#endif + +#if defined(__NEED_sa_family_t) && !defined(__DEFINED_sa_family_t) +typedef unsigned short sa_family_t; +#define __DEFINED_sa_family_t +#endif + + +#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t) +typedef struct { union { int __i[sizeof(long)==8?14:9]; volatile int __vi[sizeof(long)==8?14:9]; unsigned long __s[sizeof(long)==8?7:9]; } __u; } pthread_attr_t; +#define __DEFINED_pthread_attr_t +#endif + +#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t) +typedef struct { union { int __i[sizeof(long)==8?10:6]; volatile int __vi[sizeof(long)==8?10:6]; volatile void *volatile __p[sizeof(long)==8?5:6]; } __u; } pthread_mutex_t; +#define __DEFINED_pthread_mutex_t +#endif + +#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t) +typedef struct { union { int __i[sizeof(long)==8?10:6]; volatile int __vi[sizeof(long)==8?10:6]; volatile void *volatile __p[sizeof(long)==8?5:6]; } __u; } mtx_t; +#define __DEFINED_mtx_t +#endif + +#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t) +typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12*sizeof(int)/sizeof(void*)]; } __u; } pthread_cond_t; +#define __DEFINED_pthread_cond_t +#endif + +#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t) +typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12*sizeof(int)/sizeof(void*)]; } __u; } cnd_t; +#define __DEFINED_cnd_t +#endif + +#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t) +typedef struct { union { int __i[sizeof(long)==8?14:8]; volatile int __vi[sizeof(long)==8?14:8]; void *__p[sizeof(long)==8?7:8]; } __u; } pthread_rwlock_t; +#define __DEFINED_pthread_rwlock_t +#endif + +#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t) +typedef struct { union { int __i[sizeof(long)==8?8:5]; volatile int __vi[sizeof(long)==8?8:5]; void *__p[sizeof(long)==8?4:5]; } __u; } pthread_barrier_t; +#define __DEFINED_pthread_barrier_t +#endif + + +#undef _Addr +#undef _Int64 +#undef _Reg \ No newline at end of file diff --git a/lib/libc/include/x86_64-linux-muslx32/bits/fcntl.h b/lib/libc/include/x86_64-linux-muslx32/bits/fcntl.h new file mode 100644 index 0000000000..283a2d14a6 --- /dev/null +++ b/lib/libc/include/x86_64-linux-muslx32/bits/fcntl.h @@ -0,0 +1,40 @@ +#define O_CREAT 0100 +#define O_EXCL 0200 +#define O_NOCTTY 0400 +#define O_TRUNC 01000 +#define O_APPEND 02000 +#define O_NONBLOCK 04000 +#define O_DSYNC 010000 +#define O_SYNC 04010000 +#define O_RSYNC 04010000 +#define O_DIRECTORY 0200000 +#define O_NOFOLLOW 0400000 +#define O_CLOEXEC 02000000 + +#define O_ASYNC 020000 +#define O_DIRECT 040000 +#define O_LARGEFILE 0100000 +#define O_NOATIME 01000000 +#define O_PATH 010000000 +#define O_TMPFILE 020200000 +#define O_NDELAY O_NONBLOCK + +#define F_DUPFD 0 +#define F_GETFD 1 +#define F_SETFD 2 +#define F_GETFL 3 +#define F_SETFL 4 + +#define F_SETOWN 8 +#define F_GETOWN 9 +#define F_SETSIG 10 +#define F_GETSIG 11 + +#define F_GETLK 5 +#define F_SETLK 6 +#define F_SETLKW 7 + +#define F_SETOWN_EX 15 +#define F_GETOWN_EX 16 + +#define F_GETOWNER_UIDS 17 \ No newline at end of file diff --git a/lib/libc/include/x86_64-linux-muslx32/bits/float.h b/lib/libc/include/x86_64-linux-muslx32/bits/float.h new file mode 100644 index 0000000000..7d0d173bbb --- /dev/null +++ b/lib/libc/include/x86_64-linux-muslx32/bits/float.h @@ -0,0 +1,20 @@ +#ifdef __FLT_EVAL_METHOD__ +#define FLT_EVAL_METHOD __FLT_EVAL_METHOD__ +#else +#define FLT_EVAL_METHOD 0 +#endif + +#define LDBL_TRUE_MIN 3.6451995318824746025e-4951L +#define LDBL_MIN 3.3621031431120935063e-4932L +#define LDBL_MAX 1.1897314953572317650e+4932L +#define LDBL_EPSILON 1.0842021724855044340e-19L + +#define LDBL_MANT_DIG 64 +#define LDBL_MIN_EXP (-16381) +#define LDBL_MAX_EXP 16384 + +#define LDBL_DIG 18 +#define LDBL_MIN_10_EXP (-4931) +#define LDBL_MAX_10_EXP 4932 + +#define DECIMAL_DIG 21 \ No newline at end of file diff --git a/lib/libc/include/x86_64-linux-muslx32/bits/io.h b/lib/libc/include/x86_64-linux-muslx32/bits/io.h new file mode 100644 index 0000000000..be42152adb --- /dev/null +++ b/lib/libc/include/x86_64-linux-muslx32/bits/io.h @@ -0,0 +1,77 @@ +static __inline void outb(unsigned char __val, unsigned short __port) +{ + __asm__ volatile ("outb %0,%1" : : "a" (__val), "dN" (__port)); +} + +static __inline void outw(unsigned short __val, unsigned short __port) +{ + __asm__ volatile ("outw %0,%1" : : "a" (__val), "dN" (__port)); +} + +static __inline void outl(unsigned int __val, unsigned short __port) +{ + __asm__ volatile ("outl %0,%1" : : "a" (__val), "dN" (__port)); +} + +static __inline unsigned char inb(unsigned short __port) +{ + unsigned char __val; + __asm__ volatile ("inb %1,%0" : "=a" (__val) : "dN" (__port)); + return __val; +} + +static __inline unsigned short inw(unsigned short __port) +{ + unsigned short __val; + __asm__ volatile ("inw %1,%0" : "=a" (__val) : "dN" (__port)); + return __val; +} + +static __inline unsigned int inl(unsigned short __port) +{ + unsigned int __val; + __asm__ volatile ("inl %1,%0" : "=a" (__val) : "dN" (__port)); + return __val; +} + +static __inline void outsb(unsigned short __port, const void *__buf, unsigned long __n) +{ + __asm__ volatile ("cld; rep; outsb" + : "+S" (__buf), "+c" (__n) + : "d" (__port)); +} + +static __inline void outsw(unsigned short __port, const void *__buf, unsigned long __n) +{ + __asm__ volatile ("cld; rep; outsw" + : "+S" (__buf), "+c" (__n) + : "d" (__port)); +} + +static __inline void outsl(unsigned short __port, const void *__buf, unsigned long __n) +{ + __asm__ volatile ("cld; rep; outsl" + : "+S" (__buf), "+c"(__n) + : "d" (__port)); +} + +static __inline void insb(unsigned short __port, void *__buf, unsigned long __n) +{ + __asm__ volatile ("cld; rep; insb" + : "+D" (__buf), "+c" (__n) + : "d" (__port)); +} + +static __inline void insw(unsigned short __port, void *__buf, unsigned long __n) +{ + __asm__ volatile ("cld; rep; insw" + : "+D" (__buf), "+c" (__n) + : "d" (__port)); +} + +static __inline void insl(unsigned short __port, void *__buf, unsigned long __n) +{ + __asm__ volatile ("cld; rep; insl" + : "+D" (__buf), "+c" (__n) + : "d" (__port)); +} \ No newline at end of file diff --git a/lib/libc/include/x86_64-linux-muslx32/bits/ioctl_fix.h b/lib/libc/include/x86_64-linux-muslx32/bits/ioctl_fix.h new file mode 100644 index 0000000000..b9825e1502 --- /dev/null +++ b/lib/libc/include/x86_64-linux-muslx32/bits/ioctl_fix.h @@ -0,0 +1,4 @@ +#undef SIOCGSTAMP +#undef SIOCGSTAMPNS +#define SIOCGSTAMP 0x8906 +#define SIOCGSTAMPNS 0x8907 \ No newline at end of file diff --git a/lib/libc/include/x86_64-linux-muslx32/bits/ipc.h b/lib/libc/include/x86_64-linux-muslx32/bits/ipc.h new file mode 100644 index 0000000000..d966c77610 --- /dev/null +++ b/lib/libc/include/x86_64-linux-muslx32/bits/ipc.h @@ -0,0 +1,11 @@ +struct ipc_perm { + key_t __ipc_perm_key; + uid_t uid; + gid_t gid; + uid_t cuid; + gid_t cgid; + mode_t mode; + int __ipc_perm_seq; + long long __pad1; + long long __pad2; +}; \ No newline at end of file diff --git a/lib/libc/include/x86_64-linux-muslx32/bits/limits.h b/lib/libc/include/x86_64-linux-muslx32/bits/limits.h new file mode 100644 index 0000000000..fc11433d98 --- /dev/null +++ b/lib/libc/include/x86_64-linux-muslx32/bits/limits.h @@ -0,0 +1 @@ +#define PAGESIZE 4096 \ No newline at end of file diff --git a/lib/libc/include/x86_64-linux-muslx32/bits/mman.h b/lib/libc/include/x86_64-linux-muslx32/bits/mman.h new file mode 100644 index 0000000000..7d968b07ba --- /dev/null +++ b/lib/libc/include/x86_64-linux-muslx32/bits/mman.h @@ -0,0 +1 @@ +#define MAP_32BIT 0x40 \ No newline at end of file diff --git a/lib/libc/include/x86_64-linux-muslx32/bits/msg.h b/lib/libc/include/x86_64-linux-muslx32/bits/msg.h new file mode 100644 index 0000000000..4bb57fb0cf --- /dev/null +++ b/lib/libc/include/x86_64-linux-muslx32/bits/msg.h @@ -0,0 +1,15 @@ +struct msqid_ds { + struct ipc_perm msg_perm; + time_t msg_stime; + time_t msg_rtime; + time_t msg_ctime; + unsigned long msg_cbytes; + long __unused1; + msgqnum_t msg_qnum; + long __unused2; + msglen_t msg_qbytes; + long __unused3; + pid_t msg_lspid; + pid_t msg_lrpid; + unsigned long long __unused[2]; +}; \ No newline at end of file diff --git a/lib/libc/include/x86_64-linux-muslx32/bits/ptrace.h b/lib/libc/include/x86_64-linux-muslx32/bits/ptrace.h new file mode 100644 index 0000000000..4686ac24d1 --- /dev/null +++ b/lib/libc/include/x86_64-linux-muslx32/bits/ptrace.h @@ -0,0 +1,13 @@ +#define PTRACE_GET_THREAD_AREA 25 +#define PTRACE_SET_THREAD_AREA 26 +#define PTRACE_ARCH_PRCTL 30 +#define PTRACE_SYSEMU 31 +#define PTRACE_SYSEMU_SINGLESTEP 32 +#define PTRACE_SINGLEBLOCK 33 + +#define PT_GET_THREAD_AREA PTRACE_GET_THREAD_AREA +#define PT_SET_THREAD_AREA PTRACE_SET_THREAD_AREA +#define PT_ARCH_PRCTL PTRACE_ARCH_PRCTL +#define PT_SYSEMU PTRACE_SYSEMU +#define PT_SYSEMU_SINGLESTEP PTRACE_SYSEMU_SINGLESTEP +#define PT_STEPBLOCK PTRACE_SINGLEBLOCK \ No newline at end of file diff --git a/lib/libc/include/x86_64-linux-muslx32/bits/reg.h b/lib/libc/include/x86_64-linux-muslx32/bits/reg.h new file mode 100644 index 0000000000..17d6f80728 --- /dev/null +++ b/lib/libc/include/x86_64-linux-muslx32/bits/reg.h @@ -0,0 +1,29 @@ +#undef __WORDSIZE +#define __WORDSIZE 32 +#define R15 0 +#define R14 1 +#define R13 2 +#define R12 3 +#define RBP 4 +#define RBX 5 +#define R11 6 +#define R10 7 +#define R9 8 +#define R8 9 +#define RAX 10 +#define RCX 11 +#define RDX 12 +#define RSI 13 +#define RDI 14 +#define ORIG_RAX 15 +#define RIP 16 +#define CS 17 +#define EFLAGS 18 +#define RSP 19 +#define SS 20 +#define FS_BASE 21 +#define GS_BASE 22 +#define DS 23 +#define ES 24 +#define FS 25 +#define GS 26 \ No newline at end of file diff --git a/lib/libc/include/x86_64-linux-muslx32/bits/sem.h b/lib/libc/include/x86_64-linux-muslx32/bits/sem.h new file mode 100644 index 0000000000..2ece33de64 --- /dev/null +++ b/lib/libc/include/x86_64-linux-muslx32/bits/sem.h @@ -0,0 +1,11 @@ +struct semid_ds { + struct ipc_perm sem_perm; + time_t sem_otime; + long long __unused1; + time_t sem_ctime; + long long __unused2; + unsigned short sem_nsems; + char __sem_nsems_pad[sizeof(long long)-sizeof(short)]; + long long __unused3; + long long __unused4; +}; \ No newline at end of file diff --git a/lib/libc/include/x86_64-linux-muslx32/bits/setjmp.h b/lib/libc/include/x86_64-linux-muslx32/bits/setjmp.h new file mode 100644 index 0000000000..6cb43541a3 --- /dev/null +++ b/lib/libc/include/x86_64-linux-muslx32/bits/setjmp.h @@ -0,0 +1 @@ +typedef unsigned long long __jmp_buf[8]; \ No newline at end of file diff --git a/lib/libc/include/x86_64-linux-muslx32/bits/shm.h b/lib/libc/include/x86_64-linux-muslx32/bits/shm.h new file mode 100644 index 0000000000..f0685c1347 --- /dev/null +++ b/lib/libc/include/x86_64-linux-muslx32/bits/shm.h @@ -0,0 +1,32 @@ +#define SHMLBA 4096 + +struct shmid_ds { + struct ipc_perm shm_perm; + size_t shm_segsz; + time_t shm_atime; + time_t shm_dtime; + time_t shm_ctime; + pid_t shm_cpid; + pid_t shm_lpid; + unsigned long shm_nattch; + unsigned long __pad0; + unsigned long long __pad1; + unsigned long long __pad2; +}; + +struct shminfo { + unsigned long shmmax, __pad0, shmmin, __pad1, shmmni, __pad2, + shmseg, __pad3, shmall, __pad4; + unsigned long long __unused[4]; +}; + +struct shm_info { + int __used_ids; + int __pad_ids; + unsigned long shm_tot, __pad0, shm_rss, __pad1, shm_swp, __pad2; + unsigned long __swap_attempts, __pad3, __swap_successes, __pad4; +} +#ifdef __GNUC__ +__attribute__((__aligned__(8))) +#endif +; \ No newline at end of file diff --git a/lib/libc/include/x86_64-linux-muslx32/bits/signal.h b/lib/libc/include/x86_64-linux-muslx32/bits/signal.h new file mode 100644 index 0000000000..bd12c1b3fe --- /dev/null +++ b/lib/libc/include/x86_64-linux-muslx32/bits/signal.h @@ -0,0 +1,152 @@ +#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ + || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) + +#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) +#define MINSIGSTKSZ 2048 +#define SIGSTKSZ 8192 +#endif + +#ifdef _GNU_SOURCE +enum { REG_R8 = 0 }; +#define REG_R8 REG_R8 +enum { REG_R9 = 1 }; +#define REG_R9 REG_R9 +enum { REG_R10 = 2 }; +#define REG_R10 REG_R10 +enum { REG_R11 = 3 }; +#define REG_R11 REG_R11 +enum { REG_R12 = 4 }; +#define REG_R12 REG_R12 +enum { REG_R13 = 5 }; +#define REG_R13 REG_R13 +enum { REG_R14 = 6 }; +#define REG_R14 REG_R14 +enum { REG_R15 = 7 }; +#define REG_R15 REG_R15 +enum { REG_RDI = 8 }; +#define REG_RDI REG_RDI +enum { REG_RSI = 9 }; +#define REG_RSI REG_RSI +enum { REG_RBP = 10 }; +#define REG_RBP REG_RBP +enum { REG_RBX = 11 }; +#define REG_RBX REG_RBX +enum { REG_RDX = 12 }; +#define REG_RDX REG_RDX +enum { REG_RAX = 13 }; +#define REG_RAX REG_RAX +enum { REG_RCX = 14 }; +#define REG_RCX REG_RCX +enum { REG_RSP = 15 }; +#define REG_RSP REG_RSP +enum { REG_RIP = 16 }; +#define REG_RIP REG_RIP +enum { REG_EFL = 17 }; +#define REG_EFL REG_EFL +enum { REG_CSGSFS = 18 }; +#define REG_CSGSFS REG_CSGSFS +enum { REG_ERR = 19 }; +#define REG_ERR REG_ERR +enum { REG_TRAPNO = 20 }; +#define REG_TRAPNO REG_TRAPNO +enum { REG_OLDMASK = 21 }; +#define REG_OLDMASK REG_OLDMASK +enum { REG_CR2 = 22 }; +#define REG_CR2 REG_CR2 +#endif + +#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) +typedef long long greg_t, gregset_t[23]; +typedef struct _fpstate { + unsigned short cwd, swd, ftw, fop; + unsigned long long rip, rdp; + unsigned mxcsr, mxcr_mask; + struct { + unsigned short significand[4], exponent, padding[3]; + } _st[8]; + struct { + unsigned element[4]; + } _xmm[16]; + unsigned padding[24]; +} *fpregset_t; +struct sigcontext { + unsigned long long r8, r9, r10, r11, r12, r13, r14, r15; + unsigned long long rdi, rsi, rbp, rbx, rdx, rax, rcx, rsp, rip, eflags; + unsigned short cs, gs, fs, __pad0; + unsigned long long err, trapno, oldmask, cr2; + struct _fpstate *fpstate; + unsigned long long __reserved1[8]; +}; +typedef struct { + gregset_t gregs; + fpregset_t fpregs; + unsigned long long __reserved1[8]; +} mcontext_t; +#else +typedef struct { + unsigned long long __space[32]; +} mcontext_t; +#endif + +struct sigaltstack { + void *ss_sp; + int ss_flags; + size_t ss_size; +}; + +typedef struct __ucontext { + unsigned long uc_flags; + struct __ucontext *uc_link; + stack_t uc_stack; + mcontext_t uc_mcontext; + sigset_t uc_sigmask; + unsigned long long __fpregs_mem[64]; +} ucontext_t; + +#define SA_NOCLDSTOP 1 +#define SA_NOCLDWAIT 2 +#define SA_SIGINFO 4 +#define SA_ONSTACK 0x08000000 +#define SA_RESTART 0x10000000 +#define SA_NODEFER 0x40000000 +#define SA_RESETHAND 0x80000000 +#define SA_RESTORER 0x04000000 + +#endif + +#define SIGHUP 1 +#define SIGINT 2 +#define SIGQUIT 3 +#define SIGILL 4 +#define SIGTRAP 5 +#define SIGABRT 6 +#define SIGIOT SIGABRT +#define SIGBUS 7 +#define SIGFPE 8 +#define SIGKILL 9 +#define SIGUSR1 10 +#define SIGSEGV 11 +#define SIGUSR2 12 +#define SIGPIPE 13 +#define SIGALRM 14 +#define SIGTERM 15 +#define SIGSTKFLT 16 +#define SIGCHLD 17 +#define SIGCONT 18 +#define SIGSTOP 19 +#define SIGTSTP 20 +#define SIGTTIN 21 +#define SIGTTOU 22 +#define SIGURG 23 +#define SIGXCPU 24 +#define SIGXFSZ 25 +#define SIGVTALRM 26 +#define SIGPROF 27 +#define SIGWINCH 28 +#define SIGIO 29 +#define SIGPOLL 29 +#define SIGPWR 30 +#define SIGSYS 31 +#define SIGUNUSED SIGSYS + +#define _NSIG 65 \ No newline at end of file diff --git a/lib/libc/include/x86_64-linux-muslx32/bits/socket.h b/lib/libc/include/x86_64-linux-muslx32/bits/socket.h new file mode 100644 index 0000000000..fbb01c8cc9 --- /dev/null +++ b/lib/libc/include/x86_64-linux-muslx32/bits/socket.h @@ -0,0 +1,5 @@ +#define SO_RCVTIMEO 20 +#define SO_SNDTIMEO 21 +#define SO_TIMESTAMP 29 +#define SO_TIMESTAMPNS 35 +#define SO_TIMESTAMPING 37 \ No newline at end of file diff --git a/lib/libc/include/x86_64-linux-muslx32/bits/stat.h b/lib/libc/include/x86_64-linux-muslx32/bits/stat.h new file mode 100644 index 0000000000..5950d70452 --- /dev/null +++ b/lib/libc/include/x86_64-linux-muslx32/bits/stat.h @@ -0,0 +1,22 @@ +/* copied from kernel definition, but with padding replaced + * by the corresponding correctly-sized userspace types. */ + +struct stat { + dev_t st_dev; + ino_t st_ino; + nlink_t st_nlink; + + mode_t st_mode; + uid_t st_uid; + gid_t st_gid; + unsigned int __pad0; + dev_t st_rdev; + off_t st_size; + blksize_t st_blksize; + blkcnt_t st_blocks; + + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; + long long __unused[3]; +}; \ No newline at end of file diff --git a/lib/libc/include/x86_64-linux-muslx32/bits/statfs.h b/lib/libc/include/x86_64-linux-muslx32/bits/statfs.h new file mode 100644 index 0000000000..ed33fede67 --- /dev/null +++ b/lib/libc/include/x86_64-linux-muslx32/bits/statfs.h @@ -0,0 +1,9 @@ +struct statfs { + unsigned long f_type, __pad0, f_bsize, __pad1; + fsblkcnt_t f_blocks, f_bfree, f_bavail; + fsfilcnt_t f_files, f_ffree; + fsid_t f_fsid; + unsigned long f_namelen, __pad2, f_frsize, __pad3; + unsigned long f_flags, __pad4; + unsigned long long f_spare[4]; +}; \ No newline at end of file diff --git a/lib/libc/include/x86_64-linux-muslx32/bits/syscall.h b/lib/libc/include/x86_64-linux-muslx32/bits/syscall.h new file mode 100644 index 0000000000..076f1d5234 --- /dev/null +++ b/lib/libc/include/x86_64-linux-muslx32/bits/syscall.h @@ -0,0 +1,707 @@ +#define __NR_read (0x40000000 + 0) +#define __NR_write (0x40000000 + 1) +#define __NR_open (0x40000000 + 2) +#define __NR_close (0x40000000 + 3) +#define __NR_stat (0x40000000 + 4) +#define __NR_fstat (0x40000000 + 5) +#define __NR_lstat (0x40000000 + 6) +#define __NR_poll (0x40000000 + 7) +#define __NR_lseek (0x40000000 + 8) +#define __NR_mmap (0x40000000 + 9) +#define __NR_mprotect (0x40000000 + 10) +#define __NR_munmap (0x40000000 + 11) +#define __NR_brk (0x40000000 + 12) +#define __NR_rt_sigprocmask (0x40000000 + 14) +#define __NR_pread64 (0x40000000 + 17) +#define __NR_pwrite64 (0x40000000 + 18) +#define __NR_access (0x40000000 + 21) +#define __NR_pipe (0x40000000 + 22) +#define __NR_select (0x40000000 + 23) +#define __NR_sched_yield (0x40000000 + 24) +#define __NR_mremap (0x40000000 + 25) +#define __NR_msync (0x40000000 + 26) +#define __NR_mincore (0x40000000 + 27) +#define __NR_madvise (0x40000000 + 28) +#define __NR_shmget (0x40000000 + 29) +#define __NR_shmat (0x40000000 + 30) +#define __NR_shmctl (0x40000000 + 31) +#define __NR_dup (0x40000000 + 32) +#define __NR_dup2 (0x40000000 + 33) +#define __NR_pause (0x40000000 + 34) +#define __NR_nanosleep (0x40000000 + 35) +#define __NR_getitimer (0x40000000 + 36) +#define __NR_alarm (0x40000000 + 37) +#define __NR_setitimer (0x40000000 + 38) +#define __NR_getpid (0x40000000 + 39) +#define __NR_sendfile (0x40000000 + 40) +#define __NR_socket (0x40000000 + 41) +#define __NR_connect (0x40000000 + 42) +#define __NR_accept (0x40000000 + 43) +#define __NR_sendto (0x40000000 + 44) +#define __NR_shutdown (0x40000000 + 48) +#define __NR_bind (0x40000000 + 49) +#define __NR_listen (0x40000000 + 50) +#define __NR_getsockname (0x40000000 + 51) +#define __NR_getpeername (0x40000000 + 52) +#define __NR_socketpair (0x40000000 + 53) +#define __NR_clone (0x40000000 + 56) +#define __NR_fork (0x40000000 + 57) +#define __NR_vfork (0x40000000 + 58) +#define __NR_exit (0x40000000 + 60) +#define __NR_wait4 (0x40000000 + 61) +#define __NR_kill (0x40000000 + 62) +#define __NR_uname (0x40000000 + 63) +#define __NR_semget (0x40000000 + 64) +#define __NR_semop (0x40000000 + 65) +#define __NR_semctl (0x40000000 + 66) +#define __NR_shmdt (0x40000000 + 67) +#define __NR_msgget (0x40000000 + 68) +#define __NR_msgsnd (0x40000000 + 69) +#define __NR_msgrcv (0x40000000 + 70) +#define __NR_msgctl (0x40000000 + 71) +#define __NR_fcntl (0x40000000 + 72) +#define __NR_flock (0x40000000 + 73) +#define __NR_fsync (0x40000000 + 74) +#define __NR_fdatasync (0x40000000 + 75) +#define __NR_truncate (0x40000000 + 76) +#define __NR_ftruncate (0x40000000 + 77) +#define __NR_getdents (0x40000000 + 78) +#define __NR_getcwd (0x40000000 + 79) +#define __NR_chdir (0x40000000 + 80) +#define __NR_fchdir (0x40000000 + 81) +#define __NR_rename (0x40000000 + 82) +#define __NR_mkdir (0x40000000 + 83) +#define __NR_rmdir (0x40000000 + 84) +#define __NR_creat (0x40000000 + 85) +#define __NR_link (0x40000000 + 86) +#define __NR_unlink (0x40000000 + 87) +#define __NR_symlink (0x40000000 + 88) +#define __NR_readlink (0x40000000 + 89) +#define __NR_chmod (0x40000000 + 90) +#define __NR_fchmod (0x40000000 + 91) +#define __NR_chown (0x40000000 + 92) +#define __NR_fchown (0x40000000 + 93) +#define __NR_lchown (0x40000000 + 94) +#define __NR_umask (0x40000000 + 95) +#define __NR_gettimeofday (0x40000000 + 96) +#define __NR_getrlimit (0x40000000 + 97) +#define __NR_getrusage (0x40000000 + 98) +#define __NR_sysinfo (0x40000000 + 99) +#define __NR_times (0x40000000 + 100) +#define __NR_getuid (0x40000000 + 102) +#define __NR_syslog (0x40000000 + 103) +#define __NR_getgid (0x40000000 + 104) +#define __NR_setuid (0x40000000 + 105) +#define __NR_setgid (0x40000000 + 106) +#define __NR_geteuid (0x40000000 + 107) +#define __NR_getegid (0x40000000 + 108) +#define __NR_setpgid (0x40000000 + 109) +#define __NR_getppid (0x40000000 + 110) +#define __NR_getpgrp (0x40000000 + 111) +#define __NR_setsid (0x40000000 + 112) +#define __NR_setreuid (0x40000000 + 113) +#define __NR_setregid (0x40000000 + 114) +#define __NR_getgroups (0x40000000 + 115) +#define __NR_setgroups (0x40000000 + 116) +#define __NR_setresuid (0x40000000 + 117) +#define __NR_getresuid (0x40000000 + 118) +#define __NR_setresgid (0x40000000 + 119) +#define __NR_getresgid (0x40000000 + 120) +#define __NR_getpgid (0x40000000 + 121) +#define __NR_setfsuid (0x40000000 + 122) +#define __NR_setfsgid (0x40000000 + 123) +#define __NR_getsid (0x40000000 + 124) +#define __NR_capget (0x40000000 + 125) +#define __NR_capset (0x40000000 + 126) +#define __NR_rt_sigsuspend (0x40000000 + 130) +#define __NR_utime (0x40000000 + 132) +#define __NR_mknod (0x40000000 + 133) +#define __NR_personality (0x40000000 + 135) +#define __NR_ustat (0x40000000 + 136) +#define __NR_statfs (0x40000000 + 137) +#define __NR_fstatfs (0x40000000 + 138) +#define __NR_sysfs (0x40000000 + 139) +#define __NR_getpriority (0x40000000 + 140) +#define __NR_setpriority (0x40000000 + 141) +#define __NR_sched_setparam (0x40000000 + 142) +#define __NR_sched_getparam (0x40000000 + 143) +#define __NR_sched_setscheduler (0x40000000 + 144) +#define __NR_sched_getscheduler (0x40000000 + 145) +#define __NR_sched_get_priority_max (0x40000000 + 146) +#define __NR_sched_get_priority_min (0x40000000 + 147) +#define __NR_sched_rr_get_interval (0x40000000 + 148) +#define __NR_mlock (0x40000000 + 149) +#define __NR_munlock (0x40000000 + 150) +#define __NR_mlockall (0x40000000 + 151) +#define __NR_munlockall (0x40000000 + 152) +#define __NR_vhangup (0x40000000 + 153) +#define __NR_modify_ldt (0x40000000 + 154) +#define __NR_pivot_root (0x40000000 + 155) +#define __NR_prctl (0x40000000 + 157) +#define __NR_arch_prctl (0x40000000 + 158) +#define __NR_adjtimex (0x40000000 + 159) +#define __NR_setrlimit (0x40000000 + 160) +#define __NR_chroot (0x40000000 + 161) +#define __NR_sync (0x40000000 + 162) +#define __NR_acct (0x40000000 + 163) +#define __NR_settimeofday (0x40000000 + 164) +#define __NR_mount (0x40000000 + 165) +#define __NR_umount2 (0x40000000 + 166) +#define __NR_swapon (0x40000000 + 167) +#define __NR_swapoff (0x40000000 + 168) +#define __NR_reboot (0x40000000 + 169) +#define __NR_sethostname (0x40000000 + 170) +#define __NR_setdomainname (0x40000000 + 171) +#define __NR_iopl (0x40000000 + 172) +#define __NR_ioperm (0x40000000 + 173) +#define __NR_init_module (0x40000000 + 175) +#define __NR_delete_module (0x40000000 + 176) +#define __NR_quotactl (0x40000000 + 179) +#define __NR_getpmsg (0x40000000 + 181) +#define __NR_putpmsg (0x40000000 + 182) +#define __NR_afs_syscall (0x40000000 + 183) +#define __NR_tuxcall (0x40000000 + 184) +#define __NR_security (0x40000000 + 185) +#define __NR_gettid (0x40000000 + 186) +#define __NR_readahead (0x40000000 + 187) +#define __NR_setxattr (0x40000000 + 188) +#define __NR_lsetxattr (0x40000000 + 189) +#define __NR_fsetxattr (0x40000000 + 190) +#define __NR_getxattr (0x40000000 + 191) +#define __NR_lgetxattr (0x40000000 + 192) +#define __NR_fgetxattr (0x40000000 + 193) +#define __NR_listxattr (0x40000000 + 194) +#define __NR_llistxattr (0x40000000 + 195) +#define __NR_flistxattr (0x40000000 + 196) +#define __NR_removexattr (0x40000000 + 197) +#define __NR_lremovexattr (0x40000000 + 198) +#define __NR_fremovexattr (0x40000000 + 199) +#define __NR_tkill (0x40000000 + 200) +#define __NR_time (0x40000000 + 201) +#define __NR_futex (0x40000000 + 202) +#define __NR_sched_setaffinity (0x40000000 + 203) +#define __NR_sched_getaffinity (0x40000000 + 204) +#define __NR_io_destroy (0x40000000 + 207) +#define __NR_io_getevents (0x40000000 + 208) +#define __NR_io_cancel (0x40000000 + 210) +#define __NR_lookup_dcookie (0x40000000 + 212) +#define __NR_epoll_create (0x40000000 + 213) +#define __NR_remap_file_pages (0x40000000 + 216) +#define __NR_getdents64 (0x40000000 + 217) +#define __NR_set_tid_address (0x40000000 + 218) +#define __NR_restart_syscall (0x40000000 + 219) +#define __NR_semtimedop (0x40000000 + 220) +#define __NR_fadvise64 (0x40000000 + 221) +#define __NR_timer_settime (0x40000000 + 223) +#define __NR_timer_gettime (0x40000000 + 224) +#define __NR_timer_getoverrun (0x40000000 + 225) +#define __NR_timer_delete (0x40000000 + 226) +#define __NR_clock_settime (0x40000000 + 227) +#define __NR_clock_gettime (0x40000000 + 228) +#define __NR_clock_getres (0x40000000 + 229) +#define __NR_clock_nanosleep (0x40000000 + 230) +#define __NR_exit_group (0x40000000 + 231) +#define __NR_epoll_wait (0x40000000 + 232) +#define __NR_epoll_ctl (0x40000000 + 233) +#define __NR_tgkill (0x40000000 + 234) +#define __NR_utimes (0x40000000 + 235) +#define __NR_mbind (0x40000000 + 237) +#define __NR_set_mempolicy (0x40000000 + 238) +#define __NR_get_mempolicy (0x40000000 + 239) +#define __NR_mq_open (0x40000000 + 240) +#define __NR_mq_unlink (0x40000000 + 241) +#define __NR_mq_timedsend (0x40000000 + 242) +#define __NR_mq_timedreceive (0x40000000 + 243) +#define __NR_mq_getsetattr (0x40000000 + 245) +#define __NR_add_key (0x40000000 + 248) +#define __NR_request_key (0x40000000 + 249) +#define __NR_keyctl (0x40000000 + 250) +#define __NR_ioprio_set (0x40000000 + 251) +#define __NR_ioprio_get (0x40000000 + 252) +#define __NR_inotify_init (0x40000000 + 253) +#define __NR_inotify_add_watch (0x40000000 + 254) +#define __NR_inotify_rm_watch (0x40000000 + 255) +#define __NR_migrate_pages (0x40000000 + 256) +#define __NR_openat (0x40000000 + 257) +#define __NR_mkdirat (0x40000000 + 258) +#define __NR_mknodat (0x40000000 + 259) +#define __NR_fchownat (0x40000000 + 260) +#define __NR_futimesat (0x40000000 + 261) +#define __NR_newfstatat (0x40000000 + 262) +#define __NR_unlinkat (0x40000000 + 263) +#define __NR_renameat (0x40000000 + 264) +#define __NR_linkat (0x40000000 + 265) +#define __NR_symlinkat (0x40000000 + 266) +#define __NR_readlinkat (0x40000000 + 267) +#define __NR_fchmodat (0x40000000 + 268) +#define __NR_faccessat (0x40000000 + 269) +#define __NR_pselect6 (0x40000000 + 270) +#define __NR_ppoll (0x40000000 + 271) +#define __NR_unshare (0x40000000 + 272) +#define __NR_splice (0x40000000 + 275) +#define __NR_tee (0x40000000 + 276) +#define __NR_sync_file_range (0x40000000 + 277) +#define __NR_utimensat (0x40000000 + 280) +#define __NR_epoll_pwait (0x40000000 + 281) +#define __NR_signalfd (0x40000000 + 282) +#define __NR_timerfd_create (0x40000000 + 283) +#define __NR_eventfd (0x40000000 + 284) +#define __NR_fallocate (0x40000000 + 285) +#define __NR_timerfd_settime (0x40000000 + 286) +#define __NR_timerfd_gettime (0x40000000 + 287) +#define __NR_accept4 (0x40000000 + 288) +#define __NR_signalfd4 (0x40000000 + 289) +#define __NR_eventfd2 (0x40000000 + 290) +#define __NR_epoll_create1 (0x40000000 + 291) +#define __NR_dup3 (0x40000000 + 292) +#define __NR_pipe2 (0x40000000 + 293) +#define __NR_inotify_init1 (0x40000000 + 294) +#define __NR_perf_event_open (0x40000000 + 298) +#define __NR_fanotify_init (0x40000000 + 300) +#define __NR_fanotify_mark (0x40000000 + 301) +#define __NR_prlimit64 (0x40000000 + 302) +#define __NR_name_to_handle_at (0x40000000 + 303) +#define __NR_open_by_handle_at (0x40000000 + 304) +#define __NR_clock_adjtime (0x40000000 + 305) +#define __NR_syncfs (0x40000000 + 306) +#define __NR_setns (0x40000000 + 308) +#define __NR_getcpu (0x40000000 + 309) +#define __NR_kcmp (0x40000000 + 312) +#define __NR_finit_module (0x40000000 + 313) +#define __NR_sched_setattr (0x40000000 + 314) +#define __NR_sched_getattr (0x40000000 + 315) +#define __NR_renameat2 (0x40000000 + 316) +#define __NR_seccomp (0x40000000 + 317) +#define __NR_getrandom (0x40000000 + 318) +#define __NR_memfd_create (0x40000000 + 319) +#define __NR_kexec_file_load (0x40000000 + 320) +#define __NR_bpf (0x40000000 + 321) +#define __NR_userfaultfd (0x40000000 + 323) +#define __NR_membarrier (0x40000000 + 324) +#define __NR_mlock2 (0x40000000 + 325) +#define __NR_copy_file_range (0x40000000 + 326) +#define __NR_pkey_mprotect (0x40000000 + 329) +#define __NR_pkey_alloc (0x40000000 + 330) +#define __NR_pkey_free (0x40000000 + 331) +#define __NR_statx (0x40000000 + 332) +#define __NR_io_pgetevents (0x40000000 + 333) +#define __NR_rseq (0x40000000 + 334) +#define __NR_pidfd_send_signal (0x40000000 + 424) +#define __NR_io_uring_setup (0x40000000 + 425) +#define __NR_io_uring_enter (0x40000000 + 426) +#define __NR_io_uring_register (0x40000000 + 427) +#define __NR_open_tree (0x40000000 + 428) +#define __NR_move_mount (0x40000000 + 429) +#define __NR_fsopen (0x40000000 + 430) +#define __NR_fsconfig (0x40000000 + 431) +#define __NR_fsmount (0x40000000 + 432) +#define __NR_fspick (0x40000000 + 433) +#define __NR_pidfd_open (0x40000000 + 434) +#define __NR_clone3 (0x40000000 + 435) +#define __NR_close_range (0x40000000 + 436) +#define __NR_openat2 (0x40000000 + 437) +#define __NR_pidfd_getfd (0x40000000 + 438) +#define __NR_faccessat2 (0x40000000 + 439) +#define __NR_process_madvise (0x40000000 + 440) +#define __NR_epoll_pwait2 (0x40000000 + 441) +#define __NR_mount_setattr (0x40000000 + 442) +#define __NR_landlock_create_ruleset (0x40000000 + 444) +#define __NR_landlock_add_rule (0x40000000 + 445) +#define __NR_landlock_restrict_self (0x40000000 + 446) +#define __NR_memfd_secret (0x40000000 + 447) +#define __NR_process_mrelease (0x40000000 + 448) +#define __NR_futex_waitv (0x40000000 + 449) +#define __NR_set_mempolicy_home_node (0x40000000 + 450) +#define __NR_cachestat (0x40000000 + 451) +#define __NR_fchmodat2 (0x40000000 + 452) + + +#define __NR_rt_sigaction (0x40000000 + 512) +#define __NR_rt_sigreturn (0x40000000 + 513) +#define __NR_ioctl (0x40000000 + 514) +#define __NR_readv (0x40000000 + 515) +#define __NR_writev (0x40000000 + 516) +#define __NR_recvfrom (0x40000000 + 517) +#define __NR_sendmsg (0x40000000 + 518) +#define __NR_recvmsg (0x40000000 + 519) +#define __NR_execve (0x40000000 + 520) +#define __NR_ptrace (0x40000000 + 521) +#define __NR_rt_sigpending (0x40000000 + 522) +#define __NR_rt_sigtimedwait (0x40000000 + 523) +#define __NR_rt_sigqueueinfo (0x40000000 + 524) +#define __NR_sigaltstack (0x40000000 + 525) +#define __NR_timer_create (0x40000000 + 526) +#define __NR_mq_notify (0x40000000 + 527) +#define __NR_kexec_load (0x40000000 + 528) +#define __NR_waitid (0x40000000 + 529) +#define __NR_set_robust_list (0x40000000 + 530) +#define __NR_get_robust_list (0x40000000 + 531) +#define __NR_vmsplice (0x40000000 + 532) +#define __NR_move_pages (0x40000000 + 533) +#define __NR_preadv (0x40000000 + 534) +#define __NR_pwritev (0x40000000 + 535) +#define __NR_rt_tgsigqueueinfo (0x40000000 + 536) +#define __NR_recvmmsg (0x40000000 + 537) +#define __NR_sendmmsg (0x40000000 + 538) +#define __NR_process_vm_readv (0x40000000 + 539) +#define __NR_process_vm_writev (0x40000000 + 540) +#define __NR_setsockopt (0x40000000 + 541) +#define __NR_getsockopt (0x40000000 + 542) +#define __NR_io_setup (0x40000000 + 543) +#define __NR_io_submit (0x40000000 + 544) +#define __NR_execveat (0x40000000 + 545) +#define __NR_preadv2 (0x40000000 + 546) +#define __NR_pwritev2 (0x40000000 + 547) + +#define SYS_read (0x40000000 + 0) +#define SYS_write (0x40000000 + 1) +#define SYS_open (0x40000000 + 2) +#define SYS_close (0x40000000 + 3) +#define SYS_stat (0x40000000 + 4) +#define SYS_fstat (0x40000000 + 5) +#define SYS_lstat (0x40000000 + 6) +#define SYS_poll (0x40000000 + 7) +#define SYS_lseek (0x40000000 + 8) +#define SYS_mmap (0x40000000 + 9) +#define SYS_mprotect (0x40000000 + 10) +#define SYS_munmap (0x40000000 + 11) +#define SYS_brk (0x40000000 + 12) +#define SYS_rt_sigprocmask (0x40000000 + 14) +#define SYS_pread64 (0x40000000 + 17) +#define SYS_pwrite64 (0x40000000 + 18) +#define SYS_access (0x40000000 + 21) +#define SYS_pipe (0x40000000 + 22) +#define SYS_select (0x40000000 + 23) +#define SYS_sched_yield (0x40000000 + 24) +#define SYS_mremap (0x40000000 + 25) +#define SYS_msync (0x40000000 + 26) +#define SYS_mincore (0x40000000 + 27) +#define SYS_madvise (0x40000000 + 28) +#define SYS_shmget (0x40000000 + 29) +#define SYS_shmat (0x40000000 + 30) +#define SYS_shmctl (0x40000000 + 31) +#define SYS_dup (0x40000000 + 32) +#define SYS_dup2 (0x40000000 + 33) +#define SYS_pause (0x40000000 + 34) +#define SYS_nanosleep (0x40000000 + 35) +#define SYS_getitimer (0x40000000 + 36) +#define SYS_alarm (0x40000000 + 37) +#define SYS_setitimer (0x40000000 + 38) +#define SYS_getpid (0x40000000 + 39) +#define SYS_sendfile (0x40000000 + 40) +#define SYS_socket (0x40000000 + 41) +#define SYS_connect (0x40000000 + 42) +#define SYS_accept (0x40000000 + 43) +#define SYS_sendto (0x40000000 + 44) +#define SYS_shutdown (0x40000000 + 48) +#define SYS_bind (0x40000000 + 49) +#define SYS_listen (0x40000000 + 50) +#define SYS_getsockname (0x40000000 + 51) +#define SYS_getpeername (0x40000000 + 52) +#define SYS_socketpair (0x40000000 + 53) +#define SYS_clone (0x40000000 + 56) +#define SYS_fork (0x40000000 + 57) +#define SYS_vfork (0x40000000 + 58) +#define SYS_exit (0x40000000 + 60) +#define SYS_wait4 (0x40000000 + 61) +#define SYS_kill (0x40000000 + 62) +#define SYS_uname (0x40000000 + 63) +#define SYS_semget (0x40000000 + 64) +#define SYS_semop (0x40000000 + 65) +#define SYS_semctl (0x40000000 + 66) +#define SYS_shmdt (0x40000000 + 67) +#define SYS_msgget (0x40000000 + 68) +#define SYS_msgsnd (0x40000000 + 69) +#define SYS_msgrcv (0x40000000 + 70) +#define SYS_msgctl (0x40000000 + 71) +#define SYS_fcntl (0x40000000 + 72) +#define SYS_flock (0x40000000 + 73) +#define SYS_fsync (0x40000000 + 74) +#define SYS_fdatasync (0x40000000 + 75) +#define SYS_truncate (0x40000000 + 76) +#define SYS_ftruncate (0x40000000 + 77) +#define SYS_getdents (0x40000000 + 78) +#define SYS_getcwd (0x40000000 + 79) +#define SYS_chdir (0x40000000 + 80) +#define SYS_fchdir (0x40000000 + 81) +#define SYS_rename (0x40000000 + 82) +#define SYS_mkdir (0x40000000 + 83) +#define SYS_rmdir (0x40000000 + 84) +#define SYS_creat (0x40000000 + 85) +#define SYS_link (0x40000000 + 86) +#define SYS_unlink (0x40000000 + 87) +#define SYS_symlink (0x40000000 + 88) +#define SYS_readlink (0x40000000 + 89) +#define SYS_chmod (0x40000000 + 90) +#define SYS_fchmod (0x40000000 + 91) +#define SYS_chown (0x40000000 + 92) +#define SYS_fchown (0x40000000 + 93) +#define SYS_lchown (0x40000000 + 94) +#define SYS_umask (0x40000000 + 95) +#define SYS_gettimeofday (0x40000000 + 96) +#define SYS_getrlimit (0x40000000 + 97) +#define SYS_getrusage (0x40000000 + 98) +#define SYS_sysinfo (0x40000000 + 99) +#define SYS_times (0x40000000 + 100) +#define SYS_getuid (0x40000000 + 102) +#define SYS_syslog (0x40000000 + 103) +#define SYS_getgid (0x40000000 + 104) +#define SYS_setuid (0x40000000 + 105) +#define SYS_setgid (0x40000000 + 106) +#define SYS_geteuid (0x40000000 + 107) +#define SYS_getegid (0x40000000 + 108) +#define SYS_setpgid (0x40000000 + 109) +#define SYS_getppid (0x40000000 + 110) +#define SYS_getpgrp (0x40000000 + 111) +#define SYS_setsid (0x40000000 + 112) +#define SYS_setreuid (0x40000000 + 113) +#define SYS_setregid (0x40000000 + 114) +#define SYS_getgroups (0x40000000 + 115) +#define SYS_setgroups (0x40000000 + 116) +#define SYS_setresuid (0x40000000 + 117) +#define SYS_getresuid (0x40000000 + 118) +#define SYS_setresgid (0x40000000 + 119) +#define SYS_getresgid (0x40000000 + 120) +#define SYS_getpgid (0x40000000 + 121) +#define SYS_setfsuid (0x40000000 + 122) +#define SYS_setfsgid (0x40000000 + 123) +#define SYS_getsid (0x40000000 + 124) +#define SYS_capget (0x40000000 + 125) +#define SYS_capset (0x40000000 + 126) +#define SYS_rt_sigsuspend (0x40000000 + 130) +#define SYS_utime (0x40000000 + 132) +#define SYS_mknod (0x40000000 + 133) +#define SYS_personality (0x40000000 + 135) +#define SYS_ustat (0x40000000 + 136) +#define SYS_statfs (0x40000000 + 137) +#define SYS_fstatfs (0x40000000 + 138) +#define SYS_sysfs (0x40000000 + 139) +#define SYS_getpriority (0x40000000 + 140) +#define SYS_setpriority (0x40000000 + 141) +#define SYS_sched_setparam (0x40000000 + 142) +#define SYS_sched_getparam (0x40000000 + 143) +#define SYS_sched_setscheduler (0x40000000 + 144) +#define SYS_sched_getscheduler (0x40000000 + 145) +#define SYS_sched_get_priority_max (0x40000000 + 146) +#define SYS_sched_get_priority_min (0x40000000 + 147) +#define SYS_sched_rr_get_interval (0x40000000 + 148) +#define SYS_mlock (0x40000000 + 149) +#define SYS_munlock (0x40000000 + 150) +#define SYS_mlockall (0x40000000 + 151) +#define SYS_munlockall (0x40000000 + 152) +#define SYS_vhangup (0x40000000 + 153) +#define SYS_modify_ldt (0x40000000 + 154) +#define SYS_pivot_root (0x40000000 + 155) +#define SYS_prctl (0x40000000 + 157) +#define SYS_arch_prctl (0x40000000 + 158) +#define SYS_adjtimex (0x40000000 + 159) +#define SYS_setrlimit (0x40000000 + 160) +#define SYS_chroot (0x40000000 + 161) +#define SYS_sync (0x40000000 + 162) +#define SYS_acct (0x40000000 + 163) +#define SYS_settimeofday (0x40000000 + 164) +#define SYS_mount (0x40000000 + 165) +#define SYS_umount2 (0x40000000 + 166) +#define SYS_swapon (0x40000000 + 167) +#define SYS_swapoff (0x40000000 + 168) +#define SYS_reboot (0x40000000 + 169) +#define SYS_sethostname (0x40000000 + 170) +#define SYS_setdomainname (0x40000000 + 171) +#define SYS_iopl (0x40000000 + 172) +#define SYS_ioperm (0x40000000 + 173) +#define SYS_init_module (0x40000000 + 175) +#define SYS_delete_module (0x40000000 + 176) +#define SYS_quotactl (0x40000000 + 179) +#define SYS_getpmsg (0x40000000 + 181) +#define SYS_putpmsg (0x40000000 + 182) +#define SYS_afs_syscall (0x40000000 + 183) +#define SYS_tuxcall (0x40000000 + 184) +#define SYS_security (0x40000000 + 185) +#define SYS_gettid (0x40000000 + 186) +#define SYS_readahead (0x40000000 + 187) +#define SYS_setxattr (0x40000000 + 188) +#define SYS_lsetxattr (0x40000000 + 189) +#define SYS_fsetxattr (0x40000000 + 190) +#define SYS_getxattr (0x40000000 + 191) +#define SYS_lgetxattr (0x40000000 + 192) +#define SYS_fgetxattr (0x40000000 + 193) +#define SYS_listxattr (0x40000000 + 194) +#define SYS_llistxattr (0x40000000 + 195) +#define SYS_flistxattr (0x40000000 + 196) +#define SYS_removexattr (0x40000000 + 197) +#define SYS_lremovexattr (0x40000000 + 198) +#define SYS_fremovexattr (0x40000000 + 199) +#define SYS_tkill (0x40000000 + 200) +#define SYS_time (0x40000000 + 201) +#define SYS_futex (0x40000000 + 202) +#define SYS_sched_setaffinity (0x40000000 + 203) +#define SYS_sched_getaffinity (0x40000000 + 204) +#define SYS_io_destroy (0x40000000 + 207) +#define SYS_io_getevents (0x40000000 + 208) +#define SYS_io_cancel (0x40000000 + 210) +#define SYS_lookup_dcookie (0x40000000 + 212) +#define SYS_epoll_create (0x40000000 + 213) +#define SYS_remap_file_pages (0x40000000 + 216) +#define SYS_getdents64 (0x40000000 + 217) +#define SYS_set_tid_address (0x40000000 + 218) +#define SYS_restart_syscall (0x40000000 + 219) +#define SYS_semtimedop (0x40000000 + 220) +#define SYS_fadvise64 (0x40000000 + 221) +#define SYS_timer_settime (0x40000000 + 223) +#define SYS_timer_gettime (0x40000000 + 224) +#define SYS_timer_getoverrun (0x40000000 + 225) +#define SYS_timer_delete (0x40000000 + 226) +#define SYS_clock_settime (0x40000000 + 227) +#define SYS_clock_gettime (0x40000000 + 228) +#define SYS_clock_getres (0x40000000 + 229) +#define SYS_clock_nanosleep (0x40000000 + 230) +#define SYS_exit_group (0x40000000 + 231) +#define SYS_epoll_wait (0x40000000 + 232) +#define SYS_epoll_ctl (0x40000000 + 233) +#define SYS_tgkill (0x40000000 + 234) +#define SYS_utimes (0x40000000 + 235) +#define SYS_mbind (0x40000000 + 237) +#define SYS_set_mempolicy (0x40000000 + 238) +#define SYS_get_mempolicy (0x40000000 + 239) +#define SYS_mq_open (0x40000000 + 240) +#define SYS_mq_unlink (0x40000000 + 241) +#define SYS_mq_timedsend (0x40000000 + 242) +#define SYS_mq_timedreceive (0x40000000 + 243) +#define SYS_mq_getsetattr (0x40000000 + 245) +#define SYS_add_key (0x40000000 + 248) +#define SYS_request_key (0x40000000 + 249) +#define SYS_keyctl (0x40000000 + 250) +#define SYS_ioprio_set (0x40000000 + 251) +#define SYS_ioprio_get (0x40000000 + 252) +#define SYS_inotify_init (0x40000000 + 253) +#define SYS_inotify_add_watch (0x40000000 + 254) +#define SYS_inotify_rm_watch (0x40000000 + 255) +#define SYS_migrate_pages (0x40000000 + 256) +#define SYS_openat (0x40000000 + 257) +#define SYS_mkdirat (0x40000000 + 258) +#define SYS_mknodat (0x40000000 + 259) +#define SYS_fchownat (0x40000000 + 260) +#define SYS_futimesat (0x40000000 + 261) +#define SYS_newfstatat (0x40000000 + 262) +#define SYS_unlinkat (0x40000000 + 263) +#define SYS_renameat (0x40000000 + 264) +#define SYS_linkat (0x40000000 + 265) +#define SYS_symlinkat (0x40000000 + 266) +#define SYS_readlinkat (0x40000000 + 267) +#define SYS_fchmodat (0x40000000 + 268) +#define SYS_faccessat (0x40000000 + 269) +#define SYS_pselect6 (0x40000000 + 270) +#define SYS_ppoll (0x40000000 + 271) +#define SYS_unshare (0x40000000 + 272) +#define SYS_splice (0x40000000 + 275) +#define SYS_tee (0x40000000 + 276) +#define SYS_sync_file_range (0x40000000 + 277) +#define SYS_utimensat (0x40000000 + 280) +#define SYS_epoll_pwait (0x40000000 + 281) +#define SYS_signalfd (0x40000000 + 282) +#define SYS_timerfd_create (0x40000000 + 283) +#define SYS_eventfd (0x40000000 + 284) +#define SYS_fallocate (0x40000000 + 285) +#define SYS_timerfd_settime (0x40000000 + 286) +#define SYS_timerfd_gettime (0x40000000 + 287) +#define SYS_accept4 (0x40000000 + 288) +#define SYS_signalfd4 (0x40000000 + 289) +#define SYS_eventfd2 (0x40000000 + 290) +#define SYS_epoll_create1 (0x40000000 + 291) +#define SYS_dup3 (0x40000000 + 292) +#define SYS_pipe2 (0x40000000 + 293) +#define SYS_inotify_init1 (0x40000000 + 294) +#define SYS_perf_event_open (0x40000000 + 298) +#define SYS_fanotify_init (0x40000000 + 300) +#define SYS_fanotify_mark (0x40000000 + 301) +#define SYS_prlimit64 (0x40000000 + 302) +#define SYS_name_to_handle_at (0x40000000 + 303) +#define SYS_open_by_handle_at (0x40000000 + 304) +#define SYS_clock_adjtime (0x40000000 + 305) +#define SYS_syncfs (0x40000000 + 306) +#define SYS_setns (0x40000000 + 308) +#define SYS_getcpu (0x40000000 + 309) +#define SYS_kcmp (0x40000000 + 312) +#define SYS_finit_module (0x40000000 + 313) +#define SYS_sched_setattr (0x40000000 + 314) +#define SYS_sched_getattr (0x40000000 + 315) +#define SYS_renameat2 (0x40000000 + 316) +#define SYS_seccomp (0x40000000 + 317) +#define SYS_getrandom (0x40000000 + 318) +#define SYS_memfd_create (0x40000000 + 319) +#define SYS_kexec_file_load (0x40000000 + 320) +#define SYS_bpf (0x40000000 + 321) +#define SYS_userfaultfd (0x40000000 + 323) +#define SYS_membarrier (0x40000000 + 324) +#define SYS_mlock2 (0x40000000 + 325) +#define SYS_copy_file_range (0x40000000 + 326) +#define SYS_pkey_mprotect (0x40000000 + 329) +#define SYS_pkey_alloc (0x40000000 + 330) +#define SYS_pkey_free (0x40000000 + 331) +#define SYS_statx (0x40000000 + 332) +#define SYS_io_pgetevents (0x40000000 + 333) +#define SYS_rseq (0x40000000 + 334) +#define SYS_pidfd_send_signal (0x40000000 + 424) +#define SYS_io_uring_setup (0x40000000 + 425) +#define SYS_io_uring_enter (0x40000000 + 426) +#define SYS_io_uring_register (0x40000000 + 427) +#define SYS_open_tree (0x40000000 + 428) +#define SYS_move_mount (0x40000000 + 429) +#define SYS_fsopen (0x40000000 + 430) +#define SYS_fsconfig (0x40000000 + 431) +#define SYS_fsmount (0x40000000 + 432) +#define SYS_fspick (0x40000000 + 433) +#define SYS_pidfd_open (0x40000000 + 434) +#define SYS_clone3 (0x40000000 + 435) +#define SYS_close_range (0x40000000 + 436) +#define SYS_openat2 (0x40000000 + 437) +#define SYS_pidfd_getfd (0x40000000 + 438) +#define SYS_faccessat2 (0x40000000 + 439) +#define SYS_process_madvise (0x40000000 + 440) +#define SYS_epoll_pwait2 (0x40000000 + 441) +#define SYS_mount_setattr (0x40000000 + 442) +#define SYS_landlock_create_ruleset (0x40000000 + 444) +#define SYS_landlock_add_rule (0x40000000 + 445) +#define SYS_landlock_restrict_self (0x40000000 + 446) +#define SYS_memfd_secret (0x40000000 + 447) +#define SYS_process_mrelease (0x40000000 + 448) +#define SYS_futex_waitv (0x40000000 + 449) +#define SYS_set_mempolicy_home_node (0x40000000 + 450) +#define SYS_cachestat (0x40000000 + 451) +#define SYS_fchmodat2 (0x40000000 + 452) +#define SYS_rt_sigaction (0x40000000 + 512) +#define SYS_rt_sigreturn (0x40000000 + 513) +#define SYS_ioctl (0x40000000 + 514) +#define SYS_readv (0x40000000 + 515) +#define SYS_writev (0x40000000 + 516) +#define SYS_recvfrom (0x40000000 + 517) +#define SYS_sendmsg (0x40000000 + 518) +#define SYS_recvmsg (0x40000000 + 519) +#define SYS_execve (0x40000000 + 520) +#define SYS_ptrace (0x40000000 + 521) +#define SYS_rt_sigpending (0x40000000 + 522) +#define SYS_rt_sigtimedwait (0x40000000 + 523) +#define SYS_rt_sigqueueinfo (0x40000000 + 524) +#define SYS_sigaltstack (0x40000000 + 525) +#define SYS_timer_create (0x40000000 + 526) +#define SYS_mq_notify (0x40000000 + 527) +#define SYS_kexec_load (0x40000000 + 528) +#define SYS_waitid (0x40000000 + 529) +#define SYS_set_robust_list (0x40000000 + 530) +#define SYS_get_robust_list (0x40000000 + 531) +#define SYS_vmsplice (0x40000000 + 532) +#define SYS_move_pages (0x40000000 + 533) +#define SYS_preadv (0x40000000 + 534) +#define SYS_pwritev (0x40000000 + 535) +#define SYS_rt_tgsigqueueinfo (0x40000000 + 536) +#define SYS_recvmmsg (0x40000000 + 537) +#define SYS_sendmmsg (0x40000000 + 538) +#define SYS_process_vm_readv (0x40000000 + 539) +#define SYS_process_vm_writev (0x40000000 + 540) +#define SYS_setsockopt (0x40000000 + 541) +#define SYS_getsockopt (0x40000000 + 542) +#define SYS_io_setup (0x40000000 + 543) +#define SYS_io_submit (0x40000000 + 544) +#define SYS_execveat (0x40000000 + 545) +#define SYS_preadv2 (0x40000000 + 546) +#define SYS_pwritev2 (0x40000000 + 547) \ No newline at end of file diff --git a/lib/libc/include/x86_64-linux-muslx32/bits/user.h b/lib/libc/include/x86_64-linux-muslx32/bits/user.h new file mode 100644 index 0000000000..df72f2a5de --- /dev/null +++ b/lib/libc/include/x86_64-linux-muslx32/bits/user.h @@ -0,0 +1,41 @@ +#undef __WORDSIZE +#define __WORDSIZE 32 + +typedef struct user_fpregs_struct { + uint16_t cwd, swd, ftw, fop; + uint64_t rip, rdp; + uint32_t mxcsr, mxcr_mask; + uint32_t st_space[32], xmm_space[64], padding[24]; +} elf_fpregset_t; + +struct user_regs_struct { + unsigned long r15, r14, r13, r12, rbp, rbx, r11, r10, r9, r8; + unsigned long rax, rcx, rdx, rsi, rdi, orig_rax, rip; + unsigned long cs, eflags, rsp, ss, fs_base, gs_base, ds, es, fs, gs; +}; +#define ELF_NGREG 27 +typedef unsigned long long elf_greg_t, elf_gregset_t[ELF_NGREG]; + +struct user { + struct user_regs_struct regs; + int u_fpvalid; + struct user_fpregs_struct i387; + unsigned long u_tsize; + unsigned long u_dsize; + unsigned long u_ssize; + unsigned long start_code; + unsigned long start_stack; + long signal; + int reserved; + struct user_regs_struct *u_ar0; + struct user_fpregs_struct *u_fpstate; + unsigned long magic; + char u_comm[32]; + unsigned long u_debugreg[8]; +}; + +#define PAGE_MASK (~(PAGESIZE-1)) +#define NBPG PAGESIZE +#define UPAGES 1 +#define HOST_TEXT_START_ADDR (u.start_code) +#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) \ No newline at end of file From ec0e6440b102e947c2232a61148bcd050d783e3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Wed, 16 Oct 2024 04:52:26 +0200 Subject: [PATCH 08/14] musl: Update sources from musl 1.2.5. Adds mipsn32 and x32 sources. Also remove some useless .in files. --- lib/libc/musl/arch/aarch64/bits/alltypes.h.in | 24 - lib/libc/musl/arch/aarch64/bits/syscall.h.in | 307 ------------ lib/libc/musl/arch/arm/bits/alltypes.h.in | 21 - lib/libc/musl/arch/arm/bits/syscall.h.in | 414 --------------- lib/libc/musl/arch/i386/bits/alltypes.h.in | 31 -- lib/libc/musl/arch/i386/bits/syscall.h.in | 445 ----------------- .../musl/arch/loongarch64/bits/alltypes.h.in | 18 - .../musl/arch/loongarch64/bits/syscall.h.in | 316 ------------ lib/libc/musl/arch/m68k/bits/alltypes.h.in | 25 - lib/libc/musl/arch/m68k/bits/syscall.h.in | 423 ---------------- lib/libc/musl/arch/mips/bits/alltypes.h.in | 21 - lib/libc/musl/arch/mips/bits/syscall.h.in | 426 ---------------- lib/libc/musl/arch/mips64/bits/alltypes.h.in | 22 - lib/libc/musl/arch/mips64/bits/syscall.h.in | 356 ------------- lib/libc/musl/arch/mipsn32/atomic_arch.h | 52 ++ lib/libc/musl/arch/mipsn32/bits/errno.h | 134 +++++ lib/libc/musl/arch/mipsn32/bits/fcntl.h | 40 ++ lib/libc/musl/arch/mipsn32/bits/fenv.h | 25 + lib/libc/musl/arch/mipsn32/bits/float.h | 16 + lib/libc/musl/arch/mipsn32/bits/hwcap.h | 3 + lib/libc/musl/arch/mipsn32/bits/ioctl.h | 114 +++++ lib/libc/musl/arch/mipsn32/bits/ipcstat.h | 1 + lib/libc/musl/arch/mipsn32/bits/mman.h | 25 + lib/libc/musl/arch/mipsn32/bits/msg.h | 27 + lib/libc/musl/arch/mipsn32/bits/poll.h | 2 + lib/libc/musl/arch/mipsn32/bits/posix.h | 2 + lib/libc/musl/arch/mipsn32/bits/ptrace.h | 9 + lib/libc/musl/arch/mipsn32/bits/reg.h | 47 ++ lib/libc/musl/arch/mipsn32/bits/resource.h | 5 + lib/libc/musl/arch/mipsn32/bits/sem.h | 16 + lib/libc/musl/arch/mipsn32/bits/setjmp.h | 1 + lib/libc/musl/arch/mipsn32/bits/shm.h | 29 ++ lib/libc/musl/arch/mipsn32/bits/signal.h | 142 ++++++ lib/libc/musl/arch/mipsn32/bits/socket.h | 35 ++ lib/libc/musl/arch/mipsn32/bits/stat.h | 23 + lib/libc/musl/arch/mipsn32/bits/statfs.h | 8 + lib/libc/musl/arch/mipsn32/bits/stdint.h | 20 + lib/libc/musl/arch/mipsn32/bits/termios.h | 169 +++++++ lib/libc/musl/arch/mipsn32/bits/user.h | 15 + lib/libc/musl/arch/mipsn32/crt_arch.h | 32 ++ lib/libc/musl/arch/mipsn32/ksigaction.h | 10 + lib/libc/musl/arch/mipsn32/kstat.h | 22 + lib/libc/musl/arch/mipsn32/pthread_arch.h | 19 + lib/libc/musl/arch/mipsn32/reloc.h | 51 ++ lib/libc/musl/arch/mipsn32/syscall_arch.h | 130 +++++ lib/libc/musl/arch/powerpc/bits/alltypes.h.in | 20 - lib/libc/musl/arch/powerpc/bits/syscall.h.in | 433 ---------------- .../musl/arch/powerpc64/bits/alltypes.h.in | 20 - .../musl/arch/powerpc64/bits/syscall.h.in | 405 --------------- lib/libc/musl/arch/riscv32/bits/alltypes.h.in | 18 - lib/libc/musl/arch/riscv32/bits/syscall.h.in | 300 ----------- lib/libc/musl/arch/riscv64/bits/alltypes.h.in | 18 - lib/libc/musl/arch/riscv64/bits/syscall.h.in | 309 ------------ lib/libc/musl/arch/s390x/bits/alltypes.h.in | 19 - lib/libc/musl/arch/s390x/bits/syscall.h.in | 371 -------------- lib/libc/musl/arch/x32/atomic_arch.h | 121 +++++ lib/libc/musl/arch/x32/bits/fcntl.h | 40 ++ lib/libc/musl/arch/x32/bits/fenv.h | 34 ++ lib/libc/musl/arch/x32/bits/float.h | 20 + lib/libc/musl/arch/x32/bits/io.h | 77 +++ lib/libc/musl/arch/x32/bits/ioctl_fix.h | 4 + lib/libc/musl/arch/x32/bits/ipc.h | 11 + lib/libc/musl/arch/x32/bits/limits.h | 1 + lib/libc/musl/arch/x32/bits/mman.h | 1 + lib/libc/musl/arch/x32/bits/msg.h | 15 + lib/libc/musl/arch/x32/bits/posix.h | 2 + lib/libc/musl/arch/x32/bits/ptrace.h | 13 + lib/libc/musl/arch/x32/bits/reg.h | 29 ++ lib/libc/musl/arch/x32/bits/sem.h | 11 + lib/libc/musl/arch/x32/bits/setjmp.h | 1 + lib/libc/musl/arch/x32/bits/shm.h | 32 ++ lib/libc/musl/arch/x32/bits/signal.h | 153 ++++++ lib/libc/musl/arch/x32/bits/socket.h | 5 + lib/libc/musl/arch/x32/bits/stat.h | 22 + lib/libc/musl/arch/x32/bits/statfs.h | 9 + lib/libc/musl/arch/x32/bits/stdint.h | 20 + lib/libc/musl/arch/x32/bits/user.h | 41 ++ lib/libc/musl/arch/x32/crt_arch.h | 12 + lib/libc/musl/arch/x32/ksigaction.h | 11 + lib/libc/musl/arch/x32/kstat.h | 22 + lib/libc/musl/arch/x32/pthread_arch.h | 12 + lib/libc/musl/arch/x32/reloc.h | 31 ++ lib/libc/musl/arch/x32/syscall_arch.h | 93 ++++ lib/libc/musl/arch/x86_64/bits/alltypes.h.in | 20 - lib/libc/musl/arch/x86_64/bits/syscall.h.in | 364 -------------- lib/libc/musl/crt/mipsn32/crtn.s | 6 +- lib/libc/musl/include/alltypes.h.in | 95 ---- lib/libc/musl/ldso/dlstart.c | 15 + src/musl.zig | 472 +++++++++--------- 89 files changed, 2322 insertions(+), 5479 deletions(-) delete mode 100644 lib/libc/musl/arch/aarch64/bits/alltypes.h.in delete mode 100644 lib/libc/musl/arch/aarch64/bits/syscall.h.in delete mode 100644 lib/libc/musl/arch/arm/bits/alltypes.h.in delete mode 100644 lib/libc/musl/arch/arm/bits/syscall.h.in delete mode 100644 lib/libc/musl/arch/i386/bits/alltypes.h.in delete mode 100644 lib/libc/musl/arch/i386/bits/syscall.h.in delete mode 100644 lib/libc/musl/arch/loongarch64/bits/alltypes.h.in delete mode 100644 lib/libc/musl/arch/loongarch64/bits/syscall.h.in delete mode 100644 lib/libc/musl/arch/m68k/bits/alltypes.h.in delete mode 100644 lib/libc/musl/arch/m68k/bits/syscall.h.in delete mode 100644 lib/libc/musl/arch/mips/bits/alltypes.h.in delete mode 100644 lib/libc/musl/arch/mips/bits/syscall.h.in delete mode 100644 lib/libc/musl/arch/mips64/bits/alltypes.h.in delete mode 100644 lib/libc/musl/arch/mips64/bits/syscall.h.in create mode 100644 lib/libc/musl/arch/mipsn32/atomic_arch.h create mode 100644 lib/libc/musl/arch/mipsn32/bits/errno.h create mode 100644 lib/libc/musl/arch/mipsn32/bits/fcntl.h create mode 100644 lib/libc/musl/arch/mipsn32/bits/fenv.h create mode 100644 lib/libc/musl/arch/mipsn32/bits/float.h create mode 100644 lib/libc/musl/arch/mipsn32/bits/hwcap.h create mode 100644 lib/libc/musl/arch/mipsn32/bits/ioctl.h create mode 100644 lib/libc/musl/arch/mipsn32/bits/ipcstat.h create mode 100644 lib/libc/musl/arch/mipsn32/bits/mman.h create mode 100644 lib/libc/musl/arch/mipsn32/bits/msg.h create mode 100644 lib/libc/musl/arch/mipsn32/bits/poll.h create mode 100644 lib/libc/musl/arch/mipsn32/bits/posix.h create mode 100644 lib/libc/musl/arch/mipsn32/bits/ptrace.h create mode 100644 lib/libc/musl/arch/mipsn32/bits/reg.h create mode 100644 lib/libc/musl/arch/mipsn32/bits/resource.h create mode 100644 lib/libc/musl/arch/mipsn32/bits/sem.h create mode 100644 lib/libc/musl/arch/mipsn32/bits/setjmp.h create mode 100644 lib/libc/musl/arch/mipsn32/bits/shm.h create mode 100644 lib/libc/musl/arch/mipsn32/bits/signal.h create mode 100644 lib/libc/musl/arch/mipsn32/bits/socket.h create mode 100644 lib/libc/musl/arch/mipsn32/bits/stat.h create mode 100644 lib/libc/musl/arch/mipsn32/bits/statfs.h create mode 100644 lib/libc/musl/arch/mipsn32/bits/stdint.h create mode 100644 lib/libc/musl/arch/mipsn32/bits/termios.h create mode 100644 lib/libc/musl/arch/mipsn32/bits/user.h create mode 100644 lib/libc/musl/arch/mipsn32/crt_arch.h create mode 100644 lib/libc/musl/arch/mipsn32/ksigaction.h create mode 100644 lib/libc/musl/arch/mipsn32/kstat.h create mode 100644 lib/libc/musl/arch/mipsn32/pthread_arch.h create mode 100644 lib/libc/musl/arch/mipsn32/reloc.h create mode 100644 lib/libc/musl/arch/mipsn32/syscall_arch.h delete mode 100644 lib/libc/musl/arch/powerpc/bits/alltypes.h.in delete mode 100644 lib/libc/musl/arch/powerpc/bits/syscall.h.in delete mode 100644 lib/libc/musl/arch/powerpc64/bits/alltypes.h.in delete mode 100644 lib/libc/musl/arch/powerpc64/bits/syscall.h.in delete mode 100644 lib/libc/musl/arch/riscv32/bits/alltypes.h.in delete mode 100644 lib/libc/musl/arch/riscv32/bits/syscall.h.in delete mode 100644 lib/libc/musl/arch/riscv64/bits/alltypes.h.in delete mode 100644 lib/libc/musl/arch/riscv64/bits/syscall.h.in delete mode 100644 lib/libc/musl/arch/s390x/bits/alltypes.h.in delete mode 100644 lib/libc/musl/arch/s390x/bits/syscall.h.in create mode 100644 lib/libc/musl/arch/x32/atomic_arch.h create mode 100644 lib/libc/musl/arch/x32/bits/fcntl.h create mode 100644 lib/libc/musl/arch/x32/bits/fenv.h create mode 100644 lib/libc/musl/arch/x32/bits/float.h create mode 100644 lib/libc/musl/arch/x32/bits/io.h create mode 100644 lib/libc/musl/arch/x32/bits/ioctl_fix.h create mode 100644 lib/libc/musl/arch/x32/bits/ipc.h create mode 100644 lib/libc/musl/arch/x32/bits/limits.h create mode 100644 lib/libc/musl/arch/x32/bits/mman.h create mode 100644 lib/libc/musl/arch/x32/bits/msg.h create mode 100644 lib/libc/musl/arch/x32/bits/posix.h create mode 100644 lib/libc/musl/arch/x32/bits/ptrace.h create mode 100644 lib/libc/musl/arch/x32/bits/reg.h create mode 100644 lib/libc/musl/arch/x32/bits/sem.h create mode 100644 lib/libc/musl/arch/x32/bits/setjmp.h create mode 100644 lib/libc/musl/arch/x32/bits/shm.h create mode 100644 lib/libc/musl/arch/x32/bits/signal.h create mode 100644 lib/libc/musl/arch/x32/bits/socket.h create mode 100644 lib/libc/musl/arch/x32/bits/stat.h create mode 100644 lib/libc/musl/arch/x32/bits/statfs.h create mode 100644 lib/libc/musl/arch/x32/bits/stdint.h create mode 100644 lib/libc/musl/arch/x32/bits/user.h create mode 100644 lib/libc/musl/arch/x32/crt_arch.h create mode 100644 lib/libc/musl/arch/x32/ksigaction.h create mode 100644 lib/libc/musl/arch/x32/kstat.h create mode 100644 lib/libc/musl/arch/x32/pthread_arch.h create mode 100644 lib/libc/musl/arch/x32/reloc.h create mode 100644 lib/libc/musl/arch/x32/syscall_arch.h delete mode 100644 lib/libc/musl/arch/x86_64/bits/alltypes.h.in delete mode 100644 lib/libc/musl/arch/x86_64/bits/syscall.h.in delete mode 100644 lib/libc/musl/include/alltypes.h.in diff --git a/lib/libc/musl/arch/aarch64/bits/alltypes.h.in b/lib/libc/musl/arch/aarch64/bits/alltypes.h.in deleted file mode 100644 index c547ca0b72..0000000000 --- a/lib/libc/musl/arch/aarch64/bits/alltypes.h.in +++ /dev/null @@ -1,24 +0,0 @@ -#define _Addr long -#define _Int64 long -#define _Reg long - -#if __AARCH64EB__ -#define __BYTE_ORDER 4321 -#else -#define __BYTE_ORDER 1234 -#endif - -#define __LONG_MAX 0x7fffffffffffffffL - -#ifndef __cplusplus -TYPEDEF unsigned wchar_t; -#endif -TYPEDEF unsigned wint_t; - -TYPEDEF int blksize_t; -TYPEDEF unsigned int nlink_t; - -TYPEDEF float float_t; -TYPEDEF double double_t; - -TYPEDEF struct { long long __ll; long double __ld; } max_align_t; diff --git a/lib/libc/musl/arch/aarch64/bits/syscall.h.in b/lib/libc/musl/arch/aarch64/bits/syscall.h.in deleted file mode 100644 index ea5a152a20..0000000000 --- a/lib/libc/musl/arch/aarch64/bits/syscall.h.in +++ /dev/null @@ -1,307 +0,0 @@ -#define __NR_io_setup 0 -#define __NR_io_destroy 1 -#define __NR_io_submit 2 -#define __NR_io_cancel 3 -#define __NR_io_getevents 4 -#define __NR_setxattr 5 -#define __NR_lsetxattr 6 -#define __NR_fsetxattr 7 -#define __NR_getxattr 8 -#define __NR_lgetxattr 9 -#define __NR_fgetxattr 10 -#define __NR_listxattr 11 -#define __NR_llistxattr 12 -#define __NR_flistxattr 13 -#define __NR_removexattr 14 -#define __NR_lremovexattr 15 -#define __NR_fremovexattr 16 -#define __NR_getcwd 17 -#define __NR_lookup_dcookie 18 -#define __NR_eventfd2 19 -#define __NR_epoll_create1 20 -#define __NR_epoll_ctl 21 -#define __NR_epoll_pwait 22 -#define __NR_dup 23 -#define __NR_dup3 24 -#define __NR_fcntl 25 -#define __NR_inotify_init1 26 -#define __NR_inotify_add_watch 27 -#define __NR_inotify_rm_watch 28 -#define __NR_ioctl 29 -#define __NR_ioprio_set 30 -#define __NR_ioprio_get 31 -#define __NR_flock 32 -#define __NR_mknodat 33 -#define __NR_mkdirat 34 -#define __NR_unlinkat 35 -#define __NR_symlinkat 36 -#define __NR_linkat 37 -#define __NR_renameat 38 -#define __NR_umount2 39 -#define __NR_mount 40 -#define __NR_pivot_root 41 -#define __NR_nfsservctl 42 -#define __NR_statfs 43 -#define __NR_fstatfs 44 -#define __NR_truncate 45 -#define __NR_ftruncate 46 -#define __NR_fallocate 47 -#define __NR_faccessat 48 -#define __NR_chdir 49 -#define __NR_fchdir 50 -#define __NR_chroot 51 -#define __NR_fchmod 52 -#define __NR_fchmodat 53 -#define __NR_fchownat 54 -#define __NR_fchown 55 -#define __NR_openat 56 -#define __NR_close 57 -#define __NR_vhangup 58 -#define __NR_pipe2 59 -#define __NR_quotactl 60 -#define __NR_getdents64 61 -#define __NR_lseek 62 -#define __NR_read 63 -#define __NR_write 64 -#define __NR_readv 65 -#define __NR_writev 66 -#define __NR_pread64 67 -#define __NR_pwrite64 68 -#define __NR_preadv 69 -#define __NR_pwritev 70 -#define __NR_sendfile 71 -#define __NR_pselect6 72 -#define __NR_ppoll 73 -#define __NR_signalfd4 74 -#define __NR_vmsplice 75 -#define __NR_splice 76 -#define __NR_tee 77 -#define __NR_readlinkat 78 -#define __NR_newfstatat 79 -#define __NR_fstat 80 -#define __NR_sync 81 -#define __NR_fsync 82 -#define __NR_fdatasync 83 -#define __NR_sync_file_range 84 -#define __NR_timerfd_create 85 -#define __NR_timerfd_settime 86 -#define __NR_timerfd_gettime 87 -#define __NR_utimensat 88 -#define __NR_acct 89 -#define __NR_capget 90 -#define __NR_capset 91 -#define __NR_personality 92 -#define __NR_exit 93 -#define __NR_exit_group 94 -#define __NR_waitid 95 -#define __NR_set_tid_address 96 -#define __NR_unshare 97 -#define __NR_futex 98 -#define __NR_set_robust_list 99 -#define __NR_get_robust_list 100 -#define __NR_nanosleep 101 -#define __NR_getitimer 102 -#define __NR_setitimer 103 -#define __NR_kexec_load 104 -#define __NR_init_module 105 -#define __NR_delete_module 106 -#define __NR_timer_create 107 -#define __NR_timer_gettime 108 -#define __NR_timer_getoverrun 109 -#define __NR_timer_settime 110 -#define __NR_timer_delete 111 -#define __NR_clock_settime 112 -#define __NR_clock_gettime 113 -#define __NR_clock_getres 114 -#define __NR_clock_nanosleep 115 -#define __NR_syslog 116 -#define __NR_ptrace 117 -#define __NR_sched_setparam 118 -#define __NR_sched_setscheduler 119 -#define __NR_sched_getscheduler 120 -#define __NR_sched_getparam 121 -#define __NR_sched_setaffinity 122 -#define __NR_sched_getaffinity 123 -#define __NR_sched_yield 124 -#define __NR_sched_get_priority_max 125 -#define __NR_sched_get_priority_min 126 -#define __NR_sched_rr_get_interval 127 -#define __NR_restart_syscall 128 -#define __NR_kill 129 -#define __NR_tkill 130 -#define __NR_tgkill 131 -#define __NR_sigaltstack 132 -#define __NR_rt_sigsuspend 133 -#define __NR_rt_sigaction 134 -#define __NR_rt_sigprocmask 135 -#define __NR_rt_sigpending 136 -#define __NR_rt_sigtimedwait 137 -#define __NR_rt_sigqueueinfo 138 -#define __NR_rt_sigreturn 139 -#define __NR_setpriority 140 -#define __NR_getpriority 141 -#define __NR_reboot 142 -#define __NR_setregid 143 -#define __NR_setgid 144 -#define __NR_setreuid 145 -#define __NR_setuid 146 -#define __NR_setresuid 147 -#define __NR_getresuid 148 -#define __NR_setresgid 149 -#define __NR_getresgid 150 -#define __NR_setfsuid 151 -#define __NR_setfsgid 152 -#define __NR_times 153 -#define __NR_setpgid 154 -#define __NR_getpgid 155 -#define __NR_getsid 156 -#define __NR_setsid 157 -#define __NR_getgroups 158 -#define __NR_setgroups 159 -#define __NR_uname 160 -#define __NR_sethostname 161 -#define __NR_setdomainname 162 -#define __NR_getrlimit 163 -#define __NR_setrlimit 164 -#define __NR_getrusage 165 -#define __NR_umask 166 -#define __NR_prctl 167 -#define __NR_getcpu 168 -#define __NR_gettimeofday 169 -#define __NR_settimeofday 170 -#define __NR_adjtimex 171 -#define __NR_getpid 172 -#define __NR_getppid 173 -#define __NR_getuid 174 -#define __NR_geteuid 175 -#define __NR_getgid 176 -#define __NR_getegid 177 -#define __NR_gettid 178 -#define __NR_sysinfo 179 -#define __NR_mq_open 180 -#define __NR_mq_unlink 181 -#define __NR_mq_timedsend 182 -#define __NR_mq_timedreceive 183 -#define __NR_mq_notify 184 -#define __NR_mq_getsetattr 185 -#define __NR_msgget 186 -#define __NR_msgctl 187 -#define __NR_msgrcv 188 -#define __NR_msgsnd 189 -#define __NR_semget 190 -#define __NR_semctl 191 -#define __NR_semtimedop 192 -#define __NR_semop 193 -#define __NR_shmget 194 -#define __NR_shmctl 195 -#define __NR_shmat 196 -#define __NR_shmdt 197 -#define __NR_socket 198 -#define __NR_socketpair 199 -#define __NR_bind 200 -#define __NR_listen 201 -#define __NR_accept 202 -#define __NR_connect 203 -#define __NR_getsockname 204 -#define __NR_getpeername 205 -#define __NR_sendto 206 -#define __NR_recvfrom 207 -#define __NR_setsockopt 208 -#define __NR_getsockopt 209 -#define __NR_shutdown 210 -#define __NR_sendmsg 211 -#define __NR_recvmsg 212 -#define __NR_readahead 213 -#define __NR_brk 214 -#define __NR_munmap 215 -#define __NR_mremap 216 -#define __NR_add_key 217 -#define __NR_request_key 218 -#define __NR_keyctl 219 -#define __NR_clone 220 -#define __NR_execve 221 -#define __NR_mmap 222 -#define __NR_fadvise64 223 -#define __NR_swapon 224 -#define __NR_swapoff 225 -#define __NR_mprotect 226 -#define __NR_msync 227 -#define __NR_mlock 228 -#define __NR_munlock 229 -#define __NR_mlockall 230 -#define __NR_munlockall 231 -#define __NR_mincore 232 -#define __NR_madvise 233 -#define __NR_remap_file_pages 234 -#define __NR_mbind 235 -#define __NR_get_mempolicy 236 -#define __NR_set_mempolicy 237 -#define __NR_migrate_pages 238 -#define __NR_move_pages 239 -#define __NR_rt_tgsigqueueinfo 240 -#define __NR_perf_event_open 241 -#define __NR_accept4 242 -#define __NR_recvmmsg 243 -#define __NR_wait4 260 -#define __NR_prlimit64 261 -#define __NR_fanotify_init 262 -#define __NR_fanotify_mark 263 -#define __NR_name_to_handle_at 264 -#define __NR_open_by_handle_at 265 -#define __NR_clock_adjtime 266 -#define __NR_syncfs 267 -#define __NR_setns 268 -#define __NR_sendmmsg 269 -#define __NR_process_vm_readv 270 -#define __NR_process_vm_writev 271 -#define __NR_kcmp 272 -#define __NR_finit_module 273 -#define __NR_sched_setattr 274 -#define __NR_sched_getattr 275 -#define __NR_renameat2 276 -#define __NR_seccomp 277 -#define __NR_getrandom 278 -#define __NR_memfd_create 279 -#define __NR_bpf 280 -#define __NR_execveat 281 -#define __NR_userfaultfd 282 -#define __NR_membarrier 283 -#define __NR_mlock2 284 -#define __NR_copy_file_range 285 -#define __NR_preadv2 286 -#define __NR_pwritev2 287 -#define __NR_pkey_mprotect 288 -#define __NR_pkey_alloc 289 -#define __NR_pkey_free 290 -#define __NR_statx 291 -#define __NR_io_pgetevents 292 -#define __NR_rseq 293 -#define __NR_kexec_file_load 294 -#define __NR_pidfd_send_signal 424 -#define __NR_io_uring_setup 425 -#define __NR_io_uring_enter 426 -#define __NR_io_uring_register 427 -#define __NR_open_tree 428 -#define __NR_move_mount 429 -#define __NR_fsopen 430 -#define __NR_fsconfig 431 -#define __NR_fsmount 432 -#define __NR_fspick 433 -#define __NR_pidfd_open 434 -#define __NR_clone3 435 -#define __NR_close_range 436 -#define __NR_openat2 437 -#define __NR_pidfd_getfd 438 -#define __NR_faccessat2 439 -#define __NR_process_madvise 440 -#define __NR_epoll_pwait2 441 -#define __NR_mount_setattr 442 -#define __NR_landlock_create_ruleset 444 -#define __NR_landlock_add_rule 445 -#define __NR_landlock_restrict_self 446 -#define __NR_process_mrelease 448 -#define __NR_futex_waitv 449 -#define __NR_set_mempolicy_home_node 450 -#define __NR_cachestat 451 -#define __NR_fchmodat2 452 - diff --git a/lib/libc/musl/arch/arm/bits/alltypes.h.in b/lib/libc/musl/arch/arm/bits/alltypes.h.in deleted file mode 100644 index d62bd7bde6..0000000000 --- a/lib/libc/musl/arch/arm/bits/alltypes.h.in +++ /dev/null @@ -1,21 +0,0 @@ -#define _REDIR_TIME64 1 -#define _Addr int -#define _Int64 long long -#define _Reg int - -#if __ARMEB__ -#define __BYTE_ORDER 4321 -#else -#define __BYTE_ORDER 1234 -#endif - -#define __LONG_MAX 0x7fffffffL - -#ifndef __cplusplus -TYPEDEF unsigned wchar_t; -#endif - -TYPEDEF float float_t; -TYPEDEF double double_t; - -TYPEDEF struct { long long __ll; long double __ld; } max_align_t; diff --git a/lib/libc/musl/arch/arm/bits/syscall.h.in b/lib/libc/musl/arch/arm/bits/syscall.h.in deleted file mode 100644 index 157b304d54..0000000000 --- a/lib/libc/musl/arch/arm/bits/syscall.h.in +++ /dev/null @@ -1,414 +0,0 @@ -#define __NR_restart_syscall 0 -#define __NR_exit 1 -#define __NR_fork 2 -#define __NR_read 3 -#define __NR_write 4 -#define __NR_open 5 -#define __NR_close 6 -#define __NR_creat 8 -#define __NR_link 9 -#define __NR_unlink 10 -#define __NR_execve 11 -#define __NR_chdir 12 -#define __NR_mknod 14 -#define __NR_chmod 15 -#define __NR_lchown 16 -#define __NR_lseek 19 -#define __NR_getpid 20 -#define __NR_mount 21 -#define __NR_setuid 23 -#define __NR_getuid 24 -#define __NR_ptrace 26 -#define __NR_pause 29 -#define __NR_access 33 -#define __NR_nice 34 -#define __NR_sync 36 -#define __NR_kill 37 -#define __NR_rename 38 -#define __NR_mkdir 39 -#define __NR_rmdir 40 -#define __NR_dup 41 -#define __NR_pipe 42 -#define __NR_times 43 -#define __NR_brk 45 -#define __NR_setgid 46 -#define __NR_getgid 47 -#define __NR_geteuid 49 -#define __NR_getegid 50 -#define __NR_acct 51 -#define __NR_umount2 52 -#define __NR_ioctl 54 -#define __NR_fcntl 55 -#define __NR_setpgid 57 -#define __NR_umask 60 -#define __NR_chroot 61 -#define __NR_ustat 62 -#define __NR_dup2 63 -#define __NR_getppid 64 -#define __NR_getpgrp 65 -#define __NR_setsid 66 -#define __NR_sigaction 67 -#define __NR_setreuid 70 -#define __NR_setregid 71 -#define __NR_sigsuspend 72 -#define __NR_sigpending 73 -#define __NR_sethostname 74 -#define __NR_setrlimit 75 -#define __NR_getrusage 77 -#define __NR_gettimeofday_time32 78 -#define __NR_settimeofday_time32 79 -#define __NR_getgroups 80 -#define __NR_setgroups 81 -#define __NR_symlink 83 -#define __NR_readlink 85 -#define __NR_uselib 86 -#define __NR_swapon 87 -#define __NR_reboot 88 -#define __NR_munmap 91 -#define __NR_truncate 92 -#define __NR_ftruncate 93 -#define __NR_fchmod 94 -#define __NR_fchown 95 -#define __NR_getpriority 96 -#define __NR_setpriority 97 -#define __NR_statfs 99 -#define __NR_fstatfs 100 -#define __NR_syslog 103 -#define __NR_setitimer 104 -#define __NR_getitimer 105 -#define __NR_stat 106 -#define __NR_lstat 107 -#define __NR_fstat 108 -#define __NR_vhangup 111 -#define __NR_wait4 114 -#define __NR_swapoff 115 -#define __NR_sysinfo 116 -#define __NR_fsync 118 -#define __NR_sigreturn 119 -#define __NR_clone 120 -#define __NR_setdomainname 121 -#define __NR_uname 122 -#define __NR_adjtimex 124 -#define __NR_mprotect 125 -#define __NR_sigprocmask 126 -#define __NR_init_module 128 -#define __NR_delete_module 129 -#define __NR_quotactl 131 -#define __NR_getpgid 132 -#define __NR_fchdir 133 -#define __NR_bdflush 134 -#define __NR_sysfs 135 -#define __NR_personality 136 -#define __NR_setfsuid 138 -#define __NR_setfsgid 139 -#define __NR__llseek 140 -#define __NR_getdents 141 -#define __NR__newselect 142 -#define __NR_flock 143 -#define __NR_msync 144 -#define __NR_readv 145 -#define __NR_writev 146 -#define __NR_getsid 147 -#define __NR_fdatasync 148 -#define __NR__sysctl 149 -#define __NR_mlock 150 -#define __NR_munlock 151 -#define __NR_mlockall 152 -#define __NR_munlockall 153 -#define __NR_sched_setparam 154 -#define __NR_sched_getparam 155 -#define __NR_sched_setscheduler 156 -#define __NR_sched_getscheduler 157 -#define __NR_sched_yield 158 -#define __NR_sched_get_priority_max 159 -#define __NR_sched_get_priority_min 160 -#define __NR_sched_rr_get_interval 161 -#define __NR_nanosleep 162 -#define __NR_mremap 163 -#define __NR_setresuid 164 -#define __NR_getresuid 165 -#define __NR_poll 168 -#define __NR_nfsservctl 169 -#define __NR_setresgid 170 -#define __NR_getresgid 171 -#define __NR_prctl 172 -#define __NR_rt_sigreturn 173 -#define __NR_rt_sigaction 174 -#define __NR_rt_sigprocmask 175 -#define __NR_rt_sigpending 176 -#define __NR_rt_sigtimedwait 177 -#define __NR_rt_sigqueueinfo 178 -#define __NR_rt_sigsuspend 179 -#define __NR_pread64 180 -#define __NR_pwrite64 181 -#define __NR_chown 182 -#define __NR_getcwd 183 -#define __NR_capget 184 -#define __NR_capset 185 -#define __NR_sigaltstack 186 -#define __NR_sendfile 187 -#define __NR_vfork 190 -#define __NR_ugetrlimit 191 -#define __NR_mmap2 192 -#define __NR_truncate64 193 -#define __NR_ftruncate64 194 -#define __NR_stat64 195 -#define __NR_lstat64 196 -#define __NR_fstat64 197 -#define __NR_lchown32 198 -#define __NR_getuid32 199 -#define __NR_getgid32 200 -#define __NR_geteuid32 201 -#define __NR_getegid32 202 -#define __NR_setreuid32 203 -#define __NR_setregid32 204 -#define __NR_getgroups32 205 -#define __NR_setgroups32 206 -#define __NR_fchown32 207 -#define __NR_setresuid32 208 -#define __NR_getresuid32 209 -#define __NR_setresgid32 210 -#define __NR_getresgid32 211 -#define __NR_chown32 212 -#define __NR_setuid32 213 -#define __NR_setgid32 214 -#define __NR_setfsuid32 215 -#define __NR_setfsgid32 216 -#define __NR_getdents64 217 -#define __NR_pivot_root 218 -#define __NR_mincore 219 -#define __NR_madvise 220 -#define __NR_fcntl64 221 -#define __NR_gettid 224 -#define __NR_readahead 225 -#define __NR_setxattr 226 -#define __NR_lsetxattr 227 -#define __NR_fsetxattr 228 -#define __NR_getxattr 229 -#define __NR_lgetxattr 230 -#define __NR_fgetxattr 231 -#define __NR_listxattr 232 -#define __NR_llistxattr 233 -#define __NR_flistxattr 234 -#define __NR_removexattr 235 -#define __NR_lremovexattr 236 -#define __NR_fremovexattr 237 -#define __NR_tkill 238 -#define __NR_sendfile64 239 -#define __NR_futex 240 -#define __NR_sched_setaffinity 241 -#define __NR_sched_getaffinity 242 -#define __NR_io_setup 243 -#define __NR_io_destroy 244 -#define __NR_io_getevents 245 -#define __NR_io_submit 246 -#define __NR_io_cancel 247 -#define __NR_exit_group 248 -#define __NR_lookup_dcookie 249 -#define __NR_epoll_create 250 -#define __NR_epoll_ctl 251 -#define __NR_epoll_wait 252 -#define __NR_remap_file_pages 253 -#define __NR_set_tid_address 256 -#define __NR_timer_create 257 -#define __NR_timer_settime32 258 -#define __NR_timer_gettime32 259 -#define __NR_timer_getoverrun 260 -#define __NR_timer_delete 261 -#define __NR_clock_settime32 262 -#define __NR_clock_gettime32 263 -#define __NR_clock_getres_time32 264 -#define __NR_clock_nanosleep_time32 265 -#define __NR_statfs64 266 -#define __NR_fstatfs64 267 -#define __NR_tgkill 268 -#define __NR_utimes 269 -#define __NR_fadvise64_64 270 -#define __NR_arm_fadvise64_64 270 -#define __NR_pciconfig_iobase 271 -#define __NR_pciconfig_read 272 -#define __NR_pciconfig_write 273 -#define __NR_mq_open 274 -#define __NR_mq_unlink 275 -#define __NR_mq_timedsend 276 -#define __NR_mq_timedreceive 277 -#define __NR_mq_notify 278 -#define __NR_mq_getsetattr 279 -#define __NR_waitid 280 -#define __NR_socket 281 -#define __NR_bind 282 -#define __NR_connect 283 -#define __NR_listen 284 -#define __NR_accept 285 -#define __NR_getsockname 286 -#define __NR_getpeername 287 -#define __NR_socketpair 288 -#define __NR_send 289 -#define __NR_sendto 290 -#define __NR_recv 291 -#define __NR_recvfrom 292 -#define __NR_shutdown 293 -#define __NR_setsockopt 294 -#define __NR_getsockopt 295 -#define __NR_sendmsg 296 -#define __NR_recvmsg 297 -#define __NR_semop 298 -#define __NR_semget 299 -#define __NR_semctl 300 -#define __NR_msgsnd 301 -#define __NR_msgrcv 302 -#define __NR_msgget 303 -#define __NR_msgctl 304 -#define __NR_shmat 305 -#define __NR_shmdt 306 -#define __NR_shmget 307 -#define __NR_shmctl 308 -#define __NR_add_key 309 -#define __NR_request_key 310 -#define __NR_keyctl 311 -#define __NR_semtimedop 312 -#define __NR_vserver 313 -#define __NR_ioprio_set 314 -#define __NR_ioprio_get 315 -#define __NR_inotify_init 316 -#define __NR_inotify_add_watch 317 -#define __NR_inotify_rm_watch 318 -#define __NR_mbind 319 -#define __NR_get_mempolicy 320 -#define __NR_set_mempolicy 321 -#define __NR_openat 322 -#define __NR_mkdirat 323 -#define __NR_mknodat 324 -#define __NR_fchownat 325 -#define __NR_futimesat 326 -#define __NR_fstatat64 327 -#define __NR_unlinkat 328 -#define __NR_renameat 329 -#define __NR_linkat 330 -#define __NR_symlinkat 331 -#define __NR_readlinkat 332 -#define __NR_fchmodat 333 -#define __NR_faccessat 334 -#define __NR_pselect6 335 -#define __NR_ppoll 336 -#define __NR_unshare 337 -#define __NR_set_robust_list 338 -#define __NR_get_robust_list 339 -#define __NR_splice 340 -#define __NR_sync_file_range2 341 -#define __NR_arm_sync_file_range 341 -#define __NR_tee 342 -#define __NR_vmsplice 343 -#define __NR_move_pages 344 -#define __NR_getcpu 345 -#define __NR_epoll_pwait 346 -#define __NR_kexec_load 347 -#define __NR_utimensat 348 -#define __NR_signalfd 349 -#define __NR_timerfd_create 350 -#define __NR_eventfd 351 -#define __NR_fallocate 352 -#define __NR_timerfd_settime32 353 -#define __NR_timerfd_gettime32 354 -#define __NR_signalfd4 355 -#define __NR_eventfd2 356 -#define __NR_epoll_create1 357 -#define __NR_dup3 358 -#define __NR_pipe2 359 -#define __NR_inotify_init1 360 -#define __NR_preadv 361 -#define __NR_pwritev 362 -#define __NR_rt_tgsigqueueinfo 363 -#define __NR_perf_event_open 364 -#define __NR_recvmmsg 365 -#define __NR_accept4 366 -#define __NR_fanotify_init 367 -#define __NR_fanotify_mark 368 -#define __NR_prlimit64 369 -#define __NR_name_to_handle_at 370 -#define __NR_open_by_handle_at 371 -#define __NR_clock_adjtime 372 -#define __NR_syncfs 373 -#define __NR_sendmmsg 374 -#define __NR_setns 375 -#define __NR_process_vm_readv 376 -#define __NR_process_vm_writev 377 -#define __NR_kcmp 378 -#define __NR_finit_module 379 -#define __NR_sched_setattr 380 -#define __NR_sched_getattr 381 -#define __NR_renameat2 382 -#define __NR_seccomp 383 -#define __NR_getrandom 384 -#define __NR_memfd_create 385 -#define __NR_bpf 386 -#define __NR_execveat 387 -#define __NR_userfaultfd 388 -#define __NR_membarrier 389 -#define __NR_mlock2 390 -#define __NR_copy_file_range 391 -#define __NR_preadv2 392 -#define __NR_pwritev2 393 -#define __NR_pkey_mprotect 394 -#define __NR_pkey_alloc 395 -#define __NR_pkey_free 396 -#define __NR_statx 397 -#define __NR_rseq 398 -#define __NR_io_pgetevents 399 -#define __NR_migrate_pages 400 -#define __NR_kexec_file_load 401 -#define __NR_clock_gettime64 403 -#define __NR_clock_settime64 404 -#define __NR_clock_adjtime64 405 -#define __NR_clock_getres_time64 406 -#define __NR_clock_nanosleep_time64 407 -#define __NR_timer_gettime64 408 -#define __NR_timer_settime64 409 -#define __NR_timerfd_gettime64 410 -#define __NR_timerfd_settime64 411 -#define __NR_utimensat_time64 412 -#define __NR_pselect6_time64 413 -#define __NR_ppoll_time64 414 -#define __NR_io_pgetevents_time64 416 -#define __NR_recvmmsg_time64 417 -#define __NR_mq_timedsend_time64 418 -#define __NR_mq_timedreceive_time64 419 -#define __NR_semtimedop_time64 420 -#define __NR_rt_sigtimedwait_time64 421 -#define __NR_futex_time64 422 -#define __NR_sched_rr_get_interval_time64 423 -#define __NR_pidfd_send_signal 424 -#define __NR_io_uring_setup 425 -#define __NR_io_uring_enter 426 -#define __NR_io_uring_register 427 -#define __NR_open_tree 428 -#define __NR_move_mount 429 -#define __NR_fsopen 430 -#define __NR_fsconfig 431 -#define __NR_fsmount 432 -#define __NR_fspick 433 -#define __NR_pidfd_open 434 -#define __NR_clone3 435 -#define __NR_close_range 436 -#define __NR_openat2 437 -#define __NR_pidfd_getfd 438 -#define __NR_faccessat2 439 -#define __NR_process_madvise 440 -#define __NR_epoll_pwait2 441 -#define __NR_mount_setattr 442 -#define __NR_landlock_create_ruleset 444 -#define __NR_landlock_add_rule 445 -#define __NR_landlock_restrict_self 446 -#define __NR_process_mrelease 448 -#define __NR_futex_waitv 449 -#define __NR_set_mempolicy_home_node 450 -#define __NR_cachestat 451 -#define __NR_fchmodat2 452 - -#define __ARM_NR_breakpoint 0x0f0001 -#define __ARM_NR_cacheflush 0x0f0002 -#define __ARM_NR_usr26 0x0f0003 -#define __ARM_NR_usr32 0x0f0004 -#define __ARM_NR_set_tls 0x0f0005 -#define __ARM_NR_get_tls 0x0f0006 - diff --git a/lib/libc/musl/arch/i386/bits/alltypes.h.in b/lib/libc/musl/arch/i386/bits/alltypes.h.in deleted file mode 100644 index 6feb03a6c3..0000000000 --- a/lib/libc/musl/arch/i386/bits/alltypes.h.in +++ /dev/null @@ -1,31 +0,0 @@ -#define _REDIR_TIME64 1 -#define _Addr int -#define _Int64 long long -#define _Reg int - -#define __BYTE_ORDER 1234 -#define __LONG_MAX 0x7fffffffL - -#ifndef __cplusplus -#ifdef __WCHAR_TYPE__ -TYPEDEF __WCHAR_TYPE__ wchar_t; -#else -TYPEDEF long wchar_t; -#endif -#endif - -#if defined(__FLT_EVAL_METHOD__) && __FLT_EVAL_METHOD__ == 0 -TYPEDEF float float_t; -TYPEDEF double double_t; -#else -TYPEDEF long double float_t; -TYPEDEF long double double_t; -#endif - -#if !defined(__cplusplus) -TYPEDEF struct { _Alignas(8) long long __ll; long double __ld; } max_align_t; -#elif defined(__GNUC__) -TYPEDEF struct { __attribute__((__aligned__(8))) long long __ll; long double __ld; } max_align_t; -#else -TYPEDEF struct { alignas(8) long long __ll; long double __ld; } max_align_t; -#endif diff --git a/lib/libc/musl/arch/i386/bits/syscall.h.in b/lib/libc/musl/arch/i386/bits/syscall.h.in deleted file mode 100644 index 55e91cc43b..0000000000 --- a/lib/libc/musl/arch/i386/bits/syscall.h.in +++ /dev/null @@ -1,445 +0,0 @@ -#define __NR_restart_syscall 0 -#define __NR_exit 1 -#define __NR_fork 2 -#define __NR_read 3 -#define __NR_write 4 -#define __NR_open 5 -#define __NR_close 6 -#define __NR_waitpid 7 -#define __NR_creat 8 -#define __NR_link 9 -#define __NR_unlink 10 -#define __NR_execve 11 -#define __NR_chdir 12 -#define __NR_time 13 -#define __NR_mknod 14 -#define __NR_chmod 15 -#define __NR_lchown 16 -#define __NR_break 17 -#define __NR_oldstat 18 -#define __NR_lseek 19 -#define __NR_getpid 20 -#define __NR_mount 21 -#define __NR_umount 22 -#define __NR_setuid 23 -#define __NR_getuid 24 -#define __NR_stime 25 -#define __NR_ptrace 26 -#define __NR_alarm 27 -#define __NR_oldfstat 28 -#define __NR_pause 29 -#define __NR_utime 30 -#define __NR_stty 31 -#define __NR_gtty 32 -#define __NR_access 33 -#define __NR_nice 34 -#define __NR_ftime 35 -#define __NR_sync 36 -#define __NR_kill 37 -#define __NR_rename 38 -#define __NR_mkdir 39 -#define __NR_rmdir 40 -#define __NR_dup 41 -#define __NR_pipe 42 -#define __NR_times 43 -#define __NR_prof 44 -#define __NR_brk 45 -#define __NR_setgid 46 -#define __NR_getgid 47 -#define __NR_signal 48 -#define __NR_geteuid 49 -#define __NR_getegid 50 -#define __NR_acct 51 -#define __NR_umount2 52 -#define __NR_lock 53 -#define __NR_ioctl 54 -#define __NR_fcntl 55 -#define __NR_mpx 56 -#define __NR_setpgid 57 -#define __NR_ulimit 58 -#define __NR_oldolduname 59 -#define __NR_umask 60 -#define __NR_chroot 61 -#define __NR_ustat 62 -#define __NR_dup2 63 -#define __NR_getppid 64 -#define __NR_getpgrp 65 -#define __NR_setsid 66 -#define __NR_sigaction 67 -#define __NR_sgetmask 68 -#define __NR_ssetmask 69 -#define __NR_setreuid 70 -#define __NR_setregid 71 -#define __NR_sigsuspend 72 -#define __NR_sigpending 73 -#define __NR_sethostname 74 -#define __NR_setrlimit 75 -#define __NR_getrlimit 76 /* Back compatible 2Gig limited rlimit */ -#define __NR_getrusage 77 -#define __NR_gettimeofday_time32 78 -#define __NR_settimeofday_time32 79 -#define __NR_getgroups 80 -#define __NR_setgroups 81 -#define __NR_select 82 -#define __NR_symlink 83 -#define __NR_oldlstat 84 -#define __NR_readlink 85 -#define __NR_uselib 86 -#define __NR_swapon 87 -#define __NR_reboot 88 -#define __NR_readdir 89 -#define __NR_mmap 90 -#define __NR_munmap 91 -#define __NR_truncate 92 -#define __NR_ftruncate 93 -#define __NR_fchmod 94 -#define __NR_fchown 95 -#define __NR_getpriority 96 -#define __NR_setpriority 97 -#define __NR_profil 98 -#define __NR_statfs 99 -#define __NR_fstatfs 100 -#define __NR_ioperm 101 -#define __NR_socketcall 102 -#define __NR_syslog 103 -#define __NR_setitimer 104 -#define __NR_getitimer 105 -#define __NR_stat 106 -#define __NR_lstat 107 -#define __NR_fstat 108 -#define __NR_olduname 109 -#define __NR_iopl 110 -#define __NR_vhangup 111 -#define __NR_idle 112 -#define __NR_vm86old 113 -#define __NR_wait4 114 -#define __NR_swapoff 115 -#define __NR_sysinfo 116 -#define __NR_ipc 117 -#define __NR_fsync 118 -#define __NR_sigreturn 119 -#define __NR_clone 120 -#define __NR_setdomainname 121 -#define __NR_uname 122 -#define __NR_modify_ldt 123 -#define __NR_adjtimex 124 -#define __NR_mprotect 125 -#define __NR_sigprocmask 126 -#define __NR_create_module 127 -#define __NR_init_module 128 -#define __NR_delete_module 129 -#define __NR_get_kernel_syms 130 -#define __NR_quotactl 131 -#define __NR_getpgid 132 -#define __NR_fchdir 133 -#define __NR_bdflush 134 -#define __NR_sysfs 135 -#define __NR_personality 136 -#define __NR_afs_syscall 137 -#define __NR_setfsuid 138 -#define __NR_setfsgid 139 -#define __NR__llseek 140 -#define __NR_getdents 141 -#define __NR__newselect 142 -#define __NR_flock 143 -#define __NR_msync 144 -#define __NR_readv 145 -#define __NR_writev 146 -#define __NR_getsid 147 -#define __NR_fdatasync 148 -#define __NR__sysctl 149 -#define __NR_mlock 150 -#define __NR_munlock 151 -#define __NR_mlockall 152 -#define __NR_munlockall 153 -#define __NR_sched_setparam 154 -#define __NR_sched_getparam 155 -#define __NR_sched_setscheduler 156 -#define __NR_sched_getscheduler 157 -#define __NR_sched_yield 158 -#define __NR_sched_get_priority_max 159 -#define __NR_sched_get_priority_min 160 -#define __NR_sched_rr_get_interval 161 -#define __NR_nanosleep 162 -#define __NR_mremap 163 -#define __NR_setresuid 164 -#define __NR_getresuid 165 -#define __NR_vm86 166 -#define __NR_query_module 167 -#define __NR_poll 168 -#define __NR_nfsservctl 169 -#define __NR_setresgid 170 -#define __NR_getresgid 171 -#define __NR_prctl 172 -#define __NR_rt_sigreturn 173 -#define __NR_rt_sigaction 174 -#define __NR_rt_sigprocmask 175 -#define __NR_rt_sigpending 176 -#define __NR_rt_sigtimedwait 177 -#define __NR_rt_sigqueueinfo 178 -#define __NR_rt_sigsuspend 179 -#define __NR_pread64 180 -#define __NR_pwrite64 181 -#define __NR_chown 182 -#define __NR_getcwd 183 -#define __NR_capget 184 -#define __NR_capset 185 -#define __NR_sigaltstack 186 -#define __NR_sendfile 187 -#define __NR_getpmsg 188 -#define __NR_putpmsg 189 -#define __NR_vfork 190 -#define __NR_ugetrlimit 191 -#define __NR_mmap2 192 -#define __NR_truncate64 193 -#define __NR_ftruncate64 194 -#define __NR_stat64 195 -#define __NR_lstat64 196 -#define __NR_fstat64 197 -#define __NR_lchown32 198 -#define __NR_getuid32 199 -#define __NR_getgid32 200 -#define __NR_geteuid32 201 -#define __NR_getegid32 202 -#define __NR_setreuid32 203 -#define __NR_setregid32 204 -#define __NR_getgroups32 205 -#define __NR_setgroups32 206 -#define __NR_fchown32 207 -#define __NR_setresuid32 208 -#define __NR_getresuid32 209 -#define __NR_setresgid32 210 -#define __NR_getresgid32 211 -#define __NR_chown32 212 -#define __NR_setuid32 213 -#define __NR_setgid32 214 -#define __NR_setfsuid32 215 -#define __NR_setfsgid32 216 -#define __NR_pivot_root 217 -#define __NR_mincore 218 -#define __NR_madvise 219 -#define __NR_getdents64 220 -#define __NR_fcntl64 221 -/* 223 is unused */ -#define __NR_gettid 224 -#define __NR_readahead 225 -#define __NR_setxattr 226 -#define __NR_lsetxattr 227 -#define __NR_fsetxattr 228 -#define __NR_getxattr 229 -#define __NR_lgetxattr 230 -#define __NR_fgetxattr 231 -#define __NR_listxattr 232 -#define __NR_llistxattr 233 -#define __NR_flistxattr 234 -#define __NR_removexattr 235 -#define __NR_lremovexattr 236 -#define __NR_fremovexattr 237 -#define __NR_tkill 238 -#define __NR_sendfile64 239 -#define __NR_futex 240 -#define __NR_sched_setaffinity 241 -#define __NR_sched_getaffinity 242 -#define __NR_set_thread_area 243 -#define __NR_get_thread_area 244 -#define __NR_io_setup 245 -#define __NR_io_destroy 246 -#define __NR_io_getevents 247 -#define __NR_io_submit 248 -#define __NR_io_cancel 249 -#define __NR_fadvise64 250 -/* 251 is available for reuse (was briefly sys_set_zone_reclaim) */ -#define __NR_exit_group 252 -#define __NR_lookup_dcookie 253 -#define __NR_epoll_create 254 -#define __NR_epoll_ctl 255 -#define __NR_epoll_wait 256 -#define __NR_remap_file_pages 257 -#define __NR_set_tid_address 258 -#define __NR_timer_create 259 -#define __NR_timer_settime32 (__NR_timer_create+1) -#define __NR_timer_gettime32 (__NR_timer_create+2) -#define __NR_timer_getoverrun (__NR_timer_create+3) -#define __NR_timer_delete (__NR_timer_create+4) -#define __NR_clock_settime32 (__NR_timer_create+5) -#define __NR_clock_gettime32 (__NR_timer_create+6) -#define __NR_clock_getres_time32 (__NR_timer_create+7) -#define __NR_clock_nanosleep_time32 (__NR_timer_create+8) -#define __NR_statfs64 268 -#define __NR_fstatfs64 269 -#define __NR_tgkill 270 -#define __NR_utimes 271 -#define __NR_fadvise64_64 272 -#define __NR_vserver 273 -#define __NR_mbind 274 -#define __NR_get_mempolicy 275 -#define __NR_set_mempolicy 276 -#define __NR_mq_open 277 -#define __NR_mq_unlink (__NR_mq_open+1) -#define __NR_mq_timedsend (__NR_mq_open+2) -#define __NR_mq_timedreceive (__NR_mq_open+3) -#define __NR_mq_notify (__NR_mq_open+4) -#define __NR_mq_getsetattr (__NR_mq_open+5) -#define __NR_kexec_load 283 -#define __NR_waitid 284 -/* #define __NR_sys_setaltroot 285 */ -#define __NR_add_key 286 -#define __NR_request_key 287 -#define __NR_keyctl 288 -#define __NR_ioprio_set 289 -#define __NR_ioprio_get 290 -#define __NR_inotify_init 291 -#define __NR_inotify_add_watch 292 -#define __NR_inotify_rm_watch 293 -#define __NR_migrate_pages 294 -#define __NR_openat 295 -#define __NR_mkdirat 296 -#define __NR_mknodat 297 -#define __NR_fchownat 298 -#define __NR_futimesat 299 -#define __NR_fstatat64 300 -#define __NR_unlinkat 301 -#define __NR_renameat 302 -#define __NR_linkat 303 -#define __NR_symlinkat 304 -#define __NR_readlinkat 305 -#define __NR_fchmodat 306 -#define __NR_faccessat 307 -#define __NR_pselect6 308 -#define __NR_ppoll 309 -#define __NR_unshare 310 -#define __NR_set_robust_list 311 -#define __NR_get_robust_list 312 -#define __NR_splice 313 -#define __NR_sync_file_range 314 -#define __NR_tee 315 -#define __NR_vmsplice 316 -#define __NR_move_pages 317 -#define __NR_getcpu 318 -#define __NR_epoll_pwait 319 -#define __NR_utimensat 320 -#define __NR_signalfd 321 -#define __NR_timerfd_create 322 -#define __NR_eventfd 323 -#define __NR_fallocate 324 -#define __NR_timerfd_settime32 325 -#define __NR_timerfd_gettime32 326 -#define __NR_signalfd4 327 -#define __NR_eventfd2 328 -#define __NR_epoll_create1 329 -#define __NR_dup3 330 -#define __NR_pipe2 331 -#define __NR_inotify_init1 332 -#define __NR_preadv 333 -#define __NR_pwritev 334 -#define __NR_rt_tgsigqueueinfo 335 -#define __NR_perf_event_open 336 -#define __NR_recvmmsg 337 -#define __NR_fanotify_init 338 -#define __NR_fanotify_mark 339 -#define __NR_prlimit64 340 -#define __NR_name_to_handle_at 341 -#define __NR_open_by_handle_at 342 -#define __NR_clock_adjtime 343 -#define __NR_syncfs 344 -#define __NR_sendmmsg 345 -#define __NR_setns 346 -#define __NR_process_vm_readv 347 -#define __NR_process_vm_writev 348 -#define __NR_kcmp 349 -#define __NR_finit_module 350 -#define __NR_sched_setattr 351 -#define __NR_sched_getattr 352 -#define __NR_renameat2 353 -#define __NR_seccomp 354 -#define __NR_getrandom 355 -#define __NR_memfd_create 356 -#define __NR_bpf 357 -#define __NR_execveat 358 -#define __NR_socket 359 -#define __NR_socketpair 360 -#define __NR_bind 361 -#define __NR_connect 362 -#define __NR_listen 363 -#define __NR_accept4 364 -#define __NR_getsockopt 365 -#define __NR_setsockopt 366 -#define __NR_getsockname 367 -#define __NR_getpeername 368 -#define __NR_sendto 369 -#define __NR_sendmsg 370 -#define __NR_recvfrom 371 -#define __NR_recvmsg 372 -#define __NR_shutdown 373 -#define __NR_userfaultfd 374 -#define __NR_membarrier 375 -#define __NR_mlock2 376 -#define __NR_copy_file_range 377 -#define __NR_preadv2 378 -#define __NR_pwritev2 379 -#define __NR_pkey_mprotect 380 -#define __NR_pkey_alloc 381 -#define __NR_pkey_free 382 -#define __NR_statx 383 -#define __NR_arch_prctl 384 -#define __NR_io_pgetevents 385 -#define __NR_rseq 386 -#define __NR_semget 393 -#define __NR_semctl 394 -#define __NR_shmget 395 -#define __NR_shmctl 396 -#define __NR_shmat 397 -#define __NR_shmdt 398 -#define __NR_msgget 399 -#define __NR_msgsnd 400 -#define __NR_msgrcv 401 -#define __NR_msgctl 402 -#define __NR_clock_gettime64 403 -#define __NR_clock_settime64 404 -#define __NR_clock_adjtime64 405 -#define __NR_clock_getres_time64 406 -#define __NR_clock_nanosleep_time64 407 -#define __NR_timer_gettime64 408 -#define __NR_timer_settime64 409 -#define __NR_timerfd_gettime64 410 -#define __NR_timerfd_settime64 411 -#define __NR_utimensat_time64 412 -#define __NR_pselect6_time64 413 -#define __NR_ppoll_time64 414 -#define __NR_io_pgetevents_time64 416 -#define __NR_recvmmsg_time64 417 -#define __NR_mq_timedsend_time64 418 -#define __NR_mq_timedreceive_time64 419 -#define __NR_semtimedop_time64 420 -#define __NR_rt_sigtimedwait_time64 421 -#define __NR_futex_time64 422 -#define __NR_sched_rr_get_interval_time64 423 -#define __NR_pidfd_send_signal 424 -#define __NR_io_uring_setup 425 -#define __NR_io_uring_enter 426 -#define __NR_io_uring_register 427 -#define __NR_open_tree 428 -#define __NR_move_mount 429 -#define __NR_fsopen 430 -#define __NR_fsconfig 431 -#define __NR_fsmount 432 -#define __NR_fspick 433 -#define __NR_pidfd_open 434 -#define __NR_clone3 435 -#define __NR_close_range 436 -#define __NR_openat2 437 -#define __NR_pidfd_getfd 438 -#define __NR_faccessat2 439 -#define __NR_process_madvise 440 -#define __NR_epoll_pwait2 441 -#define __NR_mount_setattr 442 -#define __NR_landlock_create_ruleset 444 -#define __NR_landlock_add_rule 445 -#define __NR_landlock_restrict_self 446 -#define __NR_memfd_secret 447 -#define __NR_process_mrelease 448 -#define __NR_futex_waitv 449 -#define __NR_set_mempolicy_home_node 450 -#define __NR_cachestat 451 -#define __NR_fchmodat2 452 - diff --git a/lib/libc/musl/arch/loongarch64/bits/alltypes.h.in b/lib/libc/musl/arch/loongarch64/bits/alltypes.h.in deleted file mode 100644 index d1807aca6c..0000000000 --- a/lib/libc/musl/arch/loongarch64/bits/alltypes.h.in +++ /dev/null @@ -1,18 +0,0 @@ -#define _Addr long -#define _Int64 long -#define _Reg long - -#define __BYTE_ORDER 1234 -#define __LONG_MAX 0x7fffffffffffffffL - -#ifndef __cplusplus -TYPEDEF int wchar_t; -#endif - -TYPEDEF float float_t; -TYPEDEF double double_t; - -TYPEDEF struct { long long __ll; long double __ld; } max_align_t; - -TYPEDEF unsigned nlink_t; -TYPEDEF int blksize_t; diff --git a/lib/libc/musl/arch/loongarch64/bits/syscall.h.in b/lib/libc/musl/arch/loongarch64/bits/syscall.h.in deleted file mode 100644 index 2afb4ea16d..0000000000 --- a/lib/libc/musl/arch/loongarch64/bits/syscall.h.in +++ /dev/null @@ -1,316 +0,0 @@ -#define __NR_io_setup 0 -#define __NR_io_destroy 1 -#define __NR_io_submit 2 -#define __NR_io_cancel 3 -#define __NR_io_getevents 4 -#define __NR_setxattr 5 -#define __NR_lsetxattr 6 -#define __NR_fsetxattr 7 -#define __NR_getxattr 8 -#define __NR_lgetxattr 9 -#define __NR_fgetxattr 10 -#define __NR_listxattr 11 -#define __NR_llistxattr 12 -#define __NR_flistxattr 13 -#define __NR_removexattr 14 -#define __NR_lremovexattr 15 -#define __NR_fremovexattr 16 -#define __NR_getcwd 17 -#define __NR_lookup_dcookie 18 -#define __NR_eventfd2 19 -#define __NR_epoll_create1 20 -#define __NR_epoll_ctl 21 -#define __NR_epoll_pwait 22 -#define __NR_dup 23 -#define __NR_dup3 24 -#define __NR3264_fcntl 25 -#define __NR_inotify_init1 26 -#define __NR_inotify_add_watch 27 -#define __NR_inotify_rm_watch 28 -#define __NR_ioctl 29 -#define __NR_ioprio_set 30 -#define __NR_ioprio_get 31 -#define __NR_flock 32 -#define __NR_mknodat 33 -#define __NR_mkdirat 34 -#define __NR_unlinkat 35 -#define __NR_symlinkat 36 -#define __NR_linkat 37 -#define __NR_umount2 39 -#define __NR_mount 40 -#define __NR_pivot_root 41 -#define __NR_nfsservctl 42 -#define __NR3264_statfs 43 -#define __NR3264_fstatfs 44 -#define __NR3264_truncate 45 -#define __NR3264_ftruncate 46 -#define __NR_fallocate 47 -#define __NR_faccessat 48 -#define __NR_chdir 49 -#define __NR_fchdir 50 -#define __NR_chroot 51 -#define __NR_fchmod 52 -#define __NR_fchmodat 53 -#define __NR_fchownat 54 -#define __NR_fchown 55 -#define __NR_openat 56 -#define __NR_close 57 -#define __NR_vhangup 58 -#define __NR_pipe2 59 -#define __NR_quotactl 60 -#define __NR_getdents64 61 -#define __NR3264_lseek 62 -#define __NR_read 63 -#define __NR_write 64 -#define __NR_readv 65 -#define __NR_writev 66 -#define __NR_pread64 67 -#define __NR_pwrite64 68 -#define __NR_preadv 69 -#define __NR_pwritev 70 -#define __NR3264_sendfile 71 -#define __NR_pselect6 72 -#define __NR_ppoll 73 -#define __NR_signalfd4 74 -#define __NR_vmsplice 75 -#define __NR_splice 76 -#define __NR_tee 77 -#define __NR_readlinkat 78 -#define __NR_sync 81 -#define __NR_fsync 82 -#define __NR_fdatasync 83 -#define __NR_sync_file_range 84 -#define __NR_timerfd_create 85 -#define __NR_timerfd_settime 86 -#define __NR_timerfd_gettime 87 -#define __NR_utimensat 88 -#define __NR_acct 89 -#define __NR_capget 90 -#define __NR_capset 91 -#define __NR_personality 92 -#define __NR_exit 93 -#define __NR_exit_group 94 -#define __NR_waitid 95 -#define __NR_set_tid_address 96 -#define __NR_unshare 97 -#define __NR_futex 98 -#define __NR_set_robust_list 99 -#define __NR_get_robust_list 100 -#define __NR_nanosleep 101 -#define __NR_getitimer 102 -#define __NR_setitimer 103 -#define __NR_kexec_load 104 -#define __NR_init_module 105 -#define __NR_delete_module 106 -#define __NR_timer_create 107 -#define __NR_timer_gettime 108 -#define __NR_timer_getoverrun 109 -#define __NR_timer_settime 110 -#define __NR_timer_delete 111 -#define __NR_clock_settime 112 -#define __NR_clock_gettime 113 -#define __NR_clock_getres 114 -#define __NR_clock_nanosleep 115 -#define __NR_syslog 116 -#define __NR_ptrace 117 -#define __NR_sched_setparam 118 -#define __NR_sched_setscheduler 119 -#define __NR_sched_getscheduler 120 -#define __NR_sched_getparam 121 -#define __NR_sched_setaffinity 122 -#define __NR_sched_getaffinity 123 -#define __NR_sched_yield 124 -#define __NR_sched_get_priority_max 125 -#define __NR_sched_get_priority_min 126 -#define __NR_sched_rr_get_interval 127 -#define __NR_restart_syscall 128 -#define __NR_kill 129 -#define __NR_tkill 130 -#define __NR_tgkill 131 -#define __NR_sigaltstack 132 -#define __NR_rt_sigsuspend 133 -#define __NR_rt_sigaction 134 -#define __NR_rt_sigprocmask 135 -#define __NR_rt_sigpending 136 -#define __NR_rt_sigtimedwait 137 -#define __NR_rt_sigqueueinfo 138 -#define __NR_rt_sigreturn 139 -#define __NR_setpriority 140 -#define __NR_getpriority 141 -#define __NR_reboot 142 -#define __NR_setregid 143 -#define __NR_setgid 144 -#define __NR_setreuid 145 -#define __NR_setuid 146 -#define __NR_setresuid 147 -#define __NR_getresuid 148 -#define __NR_setresgid 149 -#define __NR_getresgid 150 -#define __NR_setfsuid 151 -#define __NR_setfsgid 152 -#define __NR_times 153 -#define __NR_setpgid 154 -#define __NR_getpgid 155 -#define __NR_getsid 156 -#define __NR_setsid 157 -#define __NR_getgroups 158 -#define __NR_setgroups 159 -#define __NR_uname 160 -#define __NR_sethostname 161 -#define __NR_setdomainname 162 -#define __NR_getrusage 165 -#define __NR_umask 166 -#define __NR_prctl 167 -#define __NR_getcpu 168 -#define __NR_gettimeofday 169 -#define __NR_settimeofday 170 -#define __NR_adjtimex 171 -#define __NR_getpid 172 -#define __NR_getppid 173 -#define __NR_getuid 174 -#define __NR_geteuid 175 -#define __NR_getgid 176 -#define __NR_getegid 177 -#define __NR_gettid 178 -#define __NR_sysinfo 179 -#define __NR_mq_open 180 -#define __NR_mq_unlink 181 -#define __NR_mq_timedsend 182 -#define __NR_mq_timedreceive 183 -#define __NR_mq_notify 184 -#define __NR_mq_getsetattr 185 -#define __NR_msgget 186 -#define __NR_msgctl 187 -#define __NR_msgrcv 188 -#define __NR_msgsnd 189 -#define __NR_semget 190 -#define __NR_semctl 191 -#define __NR_semtimedop 192 -#define __NR_semop 193 -#define __NR_shmget 194 -#define __NR_shmctl 195 -#define __NR_shmat 196 -#define __NR_shmdt 197 -#define __NR_socket 198 -#define __NR_socketpair 199 -#define __NR_bind 200 -#define __NR_listen 201 -#define __NR_accept 202 -#define __NR_connect 203 -#define __NR_getsockname 204 -#define __NR_getpeername 205 -#define __NR_sendto 206 -#define __NR_recvfrom 207 -#define __NR_setsockopt 208 -#define __NR_getsockopt 209 -#define __NR_shutdown 210 -#define __NR_sendmsg 211 -#define __NR_recvmsg 212 -#define __NR_readahead 213 -#define __NR_brk 214 -#define __NR_munmap 215 -#define __NR_mremap 216 -#define __NR_add_key 217 -#define __NR_request_key 218 -#define __NR_keyctl 219 -#define __NR_clone 220 -#define __NR_execve 221 -#define __NR3264_mmap 222 -#define __NR3264_fadvise64 223 -#define __NR_swapon 224 -#define __NR_swapoff 225 -#define __NR_mprotect 226 -#define __NR_msync 227 -#define __NR_mlock 228 -#define __NR_munlock 229 -#define __NR_mlockall 230 -#define __NR_munlockall 231 -#define __NR_mincore 232 -#define __NR_madvise 233 -#define __NR_remap_file_pages 234 -#define __NR_mbind 235 -#define __NR_get_mempolicy 236 -#define __NR_set_mempolicy 237 -#define __NR_migrate_pages 238 -#define __NR_move_pages 239 -#define __NR_rt_tgsigqueueinfo 240 -#define __NR_perf_event_open 241 -#define __NR_accept4 242 -#define __NR_recvmmsg 243 -#define __NR_arch_specific_syscall 244 -#define __NR_wait4 260 -#define __NR_prlimit64 261 -#define __NR_fanotify_init 262 -#define __NR_fanotify_mark 263 -#define __NR_name_to_handle_at 264 -#define __NR_open_by_handle_at 265 -#define __NR_clock_adjtime 266 -#define __NR_syncfs 267 -#define __NR_setns 268 -#define __NR_sendmmsg 269 -#define __NR_process_vm_readv 270 -#define __NR_process_vm_writev 271 -#define __NR_kcmp 272 -#define __NR_finit_module 273 -#define __NR_sched_setattr 274 -#define __NR_sched_getattr 275 -#define __NR_renameat2 276 -#define __NR_seccomp 277 -#define __NR_getrandom 278 -#define __NR_memfd_create 279 -#define __NR_bpf 280 -#define __NR_execveat 281 -#define __NR_userfaultfd 282 -#define __NR_membarrier 283 -#define __NR_mlock2 284 -#define __NR_copy_file_range 285 -#define __NR_preadv2 286 -#define __NR_pwritev2 287 -#define __NR_pkey_mprotect 288 -#define __NR_pkey_alloc 289 -#define __NR_pkey_free 290 -#define __NR_statx 291 -#define __NR_io_pgetevents 292 -#define __NR_rseq 293 -#define __NR_kexec_file_load 294 -#define __NR_pidfd_send_signal 424 -#define __NR_io_uring_setup 425 -#define __NR_io_uring_enter 426 -#define __NR_io_uring_register 427 -#define __NR_open_tree 428 -#define __NR_move_mount 429 -#define __NR_fsopen 430 -#define __NR_fsconfig 431 -#define __NR_fsmount 432 -#define __NR_fspick 433 -#define __NR_pidfd_open 434 -#define __NR_clone3 435 -#define __NR_close_range 436 -#define __NR_openat2 437 -#define __NR_pidfd_getfd 438 -#define __NR_faccessat2 439 -#define __NR_process_madvise 440 -#define __NR_epoll_pwait2 441 -#define __NR_mount_setattr 442 -#define __NR_quotactl_fd 443 -#define __NR_landlock_create_ruleset 444 -#define __NR_landlock_add_rule 445 -#define __NR_landlock_restrict_self 446 -#define __NR_process_mrelease 448 -#define __NR_futex_waitv 449 -#define __NR_set_mempolicy_home_node 450 -#define __NR_cachestat 451 -#define __NR_fchmodat2 452 -#define __NR_map_shadow_stack 453 -#define __NR_futex_wake 454 -#define __NR_futex_wait 455 -#define __NR_futex_requeue 456 -#define __NR_fcntl __NR3264_fcntl -#define __NR_statfs __NR3264_statfs -#define __NR_fstatfs __NR3264_fstatfs -#define __NR_truncate __NR3264_truncate -#define __NR_ftruncate __NR3264_ftruncate -#define __NR_lseek __NR3264_lseek -#define __NR_sendfile __NR3264_sendfile -#define __NR_mmap __NR3264_mmap -#define __NR_fadvise64 __NR3264_fadvise64 diff --git a/lib/libc/musl/arch/m68k/bits/alltypes.h.in b/lib/libc/musl/arch/m68k/bits/alltypes.h.in deleted file mode 100644 index f564690983..0000000000 --- a/lib/libc/musl/arch/m68k/bits/alltypes.h.in +++ /dev/null @@ -1,25 +0,0 @@ -#define _REDIR_TIME64 1 -#define _Addr int -#define _Int64 long long -#define _Reg int - -#define __BYTE_ORDER 4321 -#define __LONG_MAX 0x7fffffffL - -#ifndef __cplusplus -#ifdef __WCHAR_TYPE__ -TYPEDEF __WCHAR_TYPE__ wchar_t; -#else -TYPEDEF long wchar_t; -#endif -#endif - -#if __mcffpu__ -TYPEDEF float float_t; -TYPEDEF double double_t; -#else -TYPEDEF long double float_t; -TYPEDEF long double double_t; -#endif - -TYPEDEF struct { long long __ll; long double __ld; } max_align_t; diff --git a/lib/libc/musl/arch/m68k/bits/syscall.h.in b/lib/libc/musl/arch/m68k/bits/syscall.h.in deleted file mode 100644 index 5cd84602ad..0000000000 --- a/lib/libc/musl/arch/m68k/bits/syscall.h.in +++ /dev/null @@ -1,423 +0,0 @@ -#define __NR_restart_syscall 0 -#define __NR_exit 1 -#define __NR_fork 2 -#define __NR_read 3 -#define __NR_write 4 -#define __NR_open 5 -#define __NR_close 6 -#define __NR_waitpid 7 -#define __NR_creat 8 -#define __NR_link 9 -#define __NR_unlink 10 -#define __NR_execve 11 -#define __NR_chdir 12 -#define __NR_time 13 -#define __NR_mknod 14 -#define __NR_chmod 15 -#define __NR_chown 16 -#define __NR_oldstat 18 -#define __NR_lseek 19 -#define __NR_getpid 20 -#define __NR_mount 21 -#define __NR_umount 22 -#define __NR_setuid 23 -#define __NR_getuid 24 -#define __NR_stime 25 -#define __NR_ptrace 26 -#define __NR_alarm 27 -#define __NR_oldfstat 28 -#define __NR_pause 29 -#define __NR_utime 30 -#define __NR_access 33 -#define __NR_nice 34 -#define __NR_sync 36 -#define __NR_kill 37 -#define __NR_rename 38 -#define __NR_mkdir 39 -#define __NR_rmdir 40 -#define __NR_dup 41 -#define __NR_pipe 42 -#define __NR_times 43 -#define __NR_brk 45 -#define __NR_setgid 46 -#define __NR_getgid 47 -#define __NR_signal 48 -#define __NR_geteuid 49 -#define __NR_getegid 50 -#define __NR_acct 51 -#define __NR_umount2 52 -#define __NR_ioctl 54 -#define __NR_fcntl 55 -#define __NR_setpgid 57 -#define __NR_umask 60 -#define __NR_chroot 61 -#define __NR_ustat 62 -#define __NR_dup2 63 -#define __NR_getppid 64 -#define __NR_getpgrp 65 -#define __NR_setsid 66 -#define __NR_sigaction 67 -#define __NR_sgetmask 68 -#define __NR_ssetmask 69 -#define __NR_setreuid 70 -#define __NR_setregid 71 -#define __NR_sigsuspend 72 -#define __NR_sigpending 73 -#define __NR_sethostname 74 -#define __NR_setrlimit 75 -#define __NR_getrlimit 76 -#define __NR_getrusage 77 -#define __NR_gettimeofday_time32 78 -#define __NR_settimeofday_time32 79 -#define __NR_getgroups 80 -#define __NR_setgroups 81 -#define __NR_select 82 -#define __NR_symlink 83 -#define __NR_oldlstat 84 -#define __NR_readlink 85 -#define __NR_uselib 86 -#define __NR_swapon 87 -#define __NR_reboot 88 -#define __NR_readdir 89 -#define __NR_mmap 90 -#define __NR_munmap 91 -#define __NR_truncate 92 -#define __NR_ftruncate 93 -#define __NR_fchmod 94 -#define __NR_fchown 95 -#define __NR_getpriority 96 -#define __NR_setpriority 97 -#define __NR_statfs 99 -#define __NR_fstatfs 100 -#define __NR_socketcall 102 -#define __NR_syslog 103 -#define __NR_setitimer 104 -#define __NR_getitimer 105 -#define __NR_stat 106 -#define __NR_lstat 107 -#define __NR_fstat 108 -#define __NR_vhangup 111 -#define __NR_wait4 114 -#define __NR_swapoff 115 -#define __NR_sysinfo 116 -#define __NR_ipc 117 -#define __NR_fsync 118 -#define __NR_sigreturn 119 -#define __NR_clone 120 -#define __NR_setdomainname 121 -#define __NR_uname 122 -#define __NR_cacheflush 123 -#define __NR_adjtimex 124 -#define __NR_mprotect 125 -#define __NR_sigprocmask 126 -#define __NR_create_module 127 -#define __NR_init_module 128 -#define __NR_delete_module 129 -#define __NR_get_kernel_syms 130 -#define __NR_quotactl 131 -#define __NR_getpgid 132 -#define __NR_fchdir 133 -#define __NR_bdflush 134 -#define __NR_sysfs 135 -#define __NR_personality 136 -#define __NR_setfsuid 138 -#define __NR_setfsgid 139 -#define __NR__llseek 140 -#define __NR_getdents 141 -#define __NR__newselect 142 -#define __NR_flock 143 -#define __NR_msync 144 -#define __NR_readv 145 -#define __NR_writev 146 -#define __NR_getsid 147 -#define __NR_fdatasync 148 -#define __NR__sysctl 149 -#define __NR_mlock 150 -#define __NR_munlock 151 -#define __NR_mlockall 152 -#define __NR_munlockall 153 -#define __NR_sched_setparam 154 -#define __NR_sched_getparam 155 -#define __NR_sched_setscheduler 156 -#define __NR_sched_getscheduler 157 -#define __NR_sched_yield 158 -#define __NR_sched_get_priority_max 159 -#define __NR_sched_get_priority_min 160 -#define __NR_sched_rr_get_interval 161 -#define __NR_nanosleep 162 -#define __NR_mremap 163 -#define __NR_setresuid 164 -#define __NR_getresuid 165 -#define __NR_getpagesize 166 -#define __NR_query_module 167 -#define __NR_poll 168 -#define __NR_nfsservctl 169 -#define __NR_setresgid 170 -#define __NR_getresgid 171 -#define __NR_prctl 172 -#define __NR_rt_sigreturn 173 -#define __NR_rt_sigaction 174 -#define __NR_rt_sigprocmask 175 -#define __NR_rt_sigpending 176 -#define __NR_rt_sigtimedwait 177 -#define __NR_rt_sigqueueinfo 178 -#define __NR_rt_sigsuspend 179 -#define __NR_pread64 180 -#define __NR_pwrite64 181 -#define __NR_lchown 182 -#define __NR_getcwd 183 -#define __NR_capget 184 -#define __NR_capset 185 -#define __NR_sigaltstack 186 -#define __NR_sendfile 187 -#define __NR_getpmsg 188 -#define __NR_putpmsg 189 -#define __NR_vfork 190 -#define __NR_ugetrlimit 191 -#define __NR_mmap2 192 -#define __NR_truncate64 193 -#define __NR_ftruncate64 194 -#define __NR_stat64 195 -#define __NR_lstat64 196 -#define __NR_fstat64 197 -#define __NR_chown32 198 -#define __NR_getuid32 199 -#define __NR_getgid32 200 -#define __NR_geteuid32 201 -#define __NR_getegid32 202 -#define __NR_setreuid32 203 -#define __NR_setregid32 204 -#define __NR_getgroups32 205 -#define __NR_setgroups32 206 -#define __NR_fchown32 207 -#define __NR_setresuid32 208 -#define __NR_getresuid32 209 -#define __NR_setresgid32 210 -#define __NR_getresgid32 211 -#define __NR_lchown32 212 -#define __NR_setuid32 213 -#define __NR_setgid32 214 -#define __NR_setfsuid32 215 -#define __NR_setfsgid32 216 -#define __NR_pivot_root 217 -#define __NR_getdents64 220 -#define __NR_gettid 221 -#define __NR_tkill 222 -#define __NR_setxattr 223 -#define __NR_lsetxattr 224 -#define __NR_fsetxattr 225 -#define __NR_getxattr 226 -#define __NR_lgetxattr 227 -#define __NR_fgetxattr 228 -#define __NR_listxattr 229 -#define __NR_llistxattr 230 -#define __NR_flistxattr 231 -#define __NR_removexattr 232 -#define __NR_lremovexattr 233 -#define __NR_fremovexattr 234 -#define __NR_futex 235 -#define __NR_sendfile64 236 -#define __NR_mincore 237 -#define __NR_madvise 238 -#define __NR_fcntl64 239 -#define __NR_readahead 240 -#define __NR_io_setup 241 -#define __NR_io_destroy 242 -#define __NR_io_getevents 243 -#define __NR_io_submit 244 -#define __NR_io_cancel 245 -#define __NR_fadvise64 246 -#define __NR_exit_group 247 -#define __NR_lookup_dcookie 248 -#define __NR_epoll_create 249 -#define __NR_epoll_ctl 250 -#define __NR_epoll_wait 251 -#define __NR_remap_file_pages 252 -#define __NR_set_tid_address 253 -#define __NR_timer_create 254 -#define __NR_timer_settime32 255 -#define __NR_timer_gettime32 256 -#define __NR_timer_getoverrun 257 -#define __NR_timer_delete 258 -#define __NR_clock_settime32 259 -#define __NR_clock_gettime32 260 -#define __NR_clock_getres_time32 261 -#define __NR_clock_nanosleep_time32 262 -#define __NR_statfs64 263 -#define __NR_fstatfs64 264 -#define __NR_tgkill 265 -#define __NR_utimes 266 -#define __NR_fadvise64_64 267 -#define __NR_mbind 268 -#define __NR_get_mempolicy 269 -#define __NR_set_mempolicy 270 -#define __NR_mq_open 271 -#define __NR_mq_unlink 272 -#define __NR_mq_timedsend 273 -#define __NR_mq_timedreceive 274 -#define __NR_mq_notify 275 -#define __NR_mq_getsetattr 276 -#define __NR_waitid 277 -#define __NR_add_key 279 -#define __NR_request_key 280 -#define __NR_keyctl 281 -#define __NR_ioprio_set 282 -#define __NR_ioprio_get 283 -#define __NR_inotify_init 284 -#define __NR_inotify_add_watch 285 -#define __NR_inotify_rm_watch 286 -#define __NR_migrate_pages 287 -#define __NR_openat 288 -#define __NR_mkdirat 289 -#define __NR_mknodat 290 -#define __NR_fchownat 291 -#define __NR_futimesat 292 -#define __NR_fstatat64 293 -#define __NR_unlinkat 294 -#define __NR_renameat 295 -#define __NR_linkat 296 -#define __NR_symlinkat 297 -#define __NR_readlinkat 298 -#define __NR_fchmodat 299 -#define __NR_faccessat 300 -#define __NR_pselect6 301 -#define __NR_ppoll 302 -#define __NR_unshare 303 -#define __NR_set_robust_list 304 -#define __NR_get_robust_list 305 -#define __NR_splice 306 -#define __NR_sync_file_range 307 -#define __NR_tee 308 -#define __NR_vmsplice 309 -#define __NR_move_pages 310 -#define __NR_sched_setaffinity 311 -#define __NR_sched_getaffinity 312 -#define __NR_kexec_load 313 -#define __NR_getcpu 314 -#define __NR_epoll_pwait 315 -#define __NR_utimensat 316 -#define __NR_signalfd 317 -#define __NR_timerfd_create 318 -#define __NR_eventfd 319 -#define __NR_fallocate 320 -#define __NR_timerfd_settime32 321 -#define __NR_timerfd_gettime32 322 -#define __NR_signalfd4 323 -#define __NR_eventfd2 324 -#define __NR_epoll_create1 325 -#define __NR_dup3 326 -#define __NR_pipe2 327 -#define __NR_inotify_init1 328 -#define __NR_preadv 329 -#define __NR_pwritev 330 -#define __NR_rt_tgsigqueueinfo 331 -#define __NR_perf_event_open 332 -#define __NR_get_thread_area 333 -#define __NR_set_thread_area 334 -#define __NR_atomic_cmpxchg_32 335 -#define __NR_atomic_barrier 336 -#define __NR_fanotify_init 337 -#define __NR_fanotify_mark 338 -#define __NR_prlimit64 339 -#define __NR_name_to_handle_at 340 -#define __NR_open_by_handle_at 341 -#define __NR_clock_adjtime 342 -#define __NR_syncfs 343 -#define __NR_setns 344 -#define __NR_process_vm_readv 345 -#define __NR_process_vm_writev 346 -#define __NR_kcmp 347 -#define __NR_finit_module 348 -#define __NR_sched_setattr 349 -#define __NR_sched_getattr 350 -#define __NR_renameat2 351 -#define __NR_getrandom 352 -#define __NR_memfd_create 353 -#define __NR_bpf 354 -#define __NR_execveat 355 -#define __NR_socket 356 -#define __NR_socketpair 357 -#define __NR_bind 358 -#define __NR_connect 359 -#define __NR_listen 360 -#define __NR_accept4 361 -#define __NR_getsockopt 362 -#define __NR_setsockopt 363 -#define __NR_getsockname 364 -#define __NR_getpeername 365 -#define __NR_sendto 366 -#define __NR_sendmsg 367 -#define __NR_recvfrom 368 -#define __NR_recvmsg 369 -#define __NR_shutdown 370 -#define __NR_recvmmsg 371 -#define __NR_sendmmsg 372 -#define __NR_userfaultfd 373 -#define __NR_membarrier 374 -#define __NR_mlock2 375 -#define __NR_copy_file_range 376 -#define __NR_preadv2 377 -#define __NR_pwritev2 378 -#define __NR_statx 379 -#define __NR_seccomp 380 -#define __NR_pkey_mprotect 381 -#define __NR_pkey_alloc 382 -#define __NR_pkey_free 383 -#define __NR_rseq 384 -#define __NR_semget 393 -#define __NR_semctl 394 -#define __NR_shmget 395 -#define __NR_shmctl 396 -#define __NR_shmat 397 -#define __NR_shmdt 398 -#define __NR_msgget 399 -#define __NR_msgsnd 400 -#define __NR_msgrcv 401 -#define __NR_msgctl 402 -#define __NR_clock_gettime64 403 -#define __NR_clock_settime64 404 -#define __NR_clock_adjtime64 405 -#define __NR_clock_getres_time64 406 -#define __NR_clock_nanosleep_time64 407 -#define __NR_timer_gettime64 408 -#define __NR_timer_settime64 409 -#define __NR_timerfd_gettime64 410 -#define __NR_timerfd_settime64 411 -#define __NR_utimensat_time64 412 -#define __NR_pselect6_time64 413 -#define __NR_ppoll_time64 414 -#define __NR_io_pgetevents_time64 416 -#define __NR_recvmmsg_time64 417 -#define __NR_mq_timedsend_time64 418 -#define __NR_mq_timedreceive_time64 419 -#define __NR_semtimedop_time64 420 -#define __NR_rt_sigtimedwait_time64 421 -#define __NR_futex_time64 422 -#define __NR_sched_rr_get_interval_time64 423 -#define __NR_pidfd_send_signal 424 -#define __NR_io_uring_setup 425 -#define __NR_io_uring_enter 426 -#define __NR_io_uring_register 427 -#define __NR_open_tree 428 -#define __NR_move_mount 429 -#define __NR_fsopen 430 -#define __NR_fsconfig 431 -#define __NR_fsmount 432 -#define __NR_fspick 433 -#define __NR_pidfd_open 434 -#define __NR_clone3 435 -#define __NR_close_range 436 -#define __NR_openat2 437 -#define __NR_pidfd_getfd 438 -#define __NR_faccessat2 439 -#define __NR_process_madvise 440 -#define __NR_epoll_pwait2 441 -#define __NR_mount_setattr 442 -#define __NR_landlock_create_ruleset 444 -#define __NR_landlock_add_rule 445 -#define __NR_landlock_restrict_self 446 -#define __NR_process_mrelease 448 -#define __NR_futex_waitv 449 -#define __NR_set_mempolicy_home_node 450 -#define __NR_cachestat 451 -#define __NR_fchmodat2 452 diff --git a/lib/libc/musl/arch/mips/bits/alltypes.h.in b/lib/libc/musl/arch/mips/bits/alltypes.h.in deleted file mode 100644 index ff934a4c42..0000000000 --- a/lib/libc/musl/arch/mips/bits/alltypes.h.in +++ /dev/null @@ -1,21 +0,0 @@ -#define _REDIR_TIME64 1 -#define _Addr int -#define _Int64 long long -#define _Reg int - -#if _MIPSEL || __MIPSEL || __MIPSEL__ -#define __BYTE_ORDER 1234 -#else -#define __BYTE_ORDER 4321 -#endif - -#define __LONG_MAX 0x7fffffffL - -#ifndef __cplusplus -TYPEDEF int wchar_t; -#endif - -TYPEDEF float float_t; -TYPEDEF double double_t; - -TYPEDEF struct { long long __ll; long double __ld; } max_align_t; diff --git a/lib/libc/musl/arch/mips/bits/syscall.h.in b/lib/libc/musl/arch/mips/bits/syscall.h.in deleted file mode 100644 index 55e35742aa..0000000000 --- a/lib/libc/musl/arch/mips/bits/syscall.h.in +++ /dev/null @@ -1,426 +0,0 @@ -#define __NR_syscall 4000 -#define __NR_exit 4001 -#define __NR_fork 4002 -#define __NR_read 4003 -#define __NR_write 4004 -#define __NR_open 4005 -#define __NR_close 4006 -#define __NR_waitpid 4007 -#define __NR_creat 4008 -#define __NR_link 4009 -#define __NR_unlink 4010 -#define __NR_execve 4011 -#define __NR_chdir 4012 -#define __NR_time 4013 -#define __NR_mknod 4014 -#define __NR_chmod 4015 -#define __NR_lchown 4016 -#define __NR_break 4017 -#define __NR_unused18 4018 -#define __NR_lseek 4019 -#define __NR_getpid 4020 -#define __NR_mount 4021 -#define __NR_umount 4022 -#define __NR_setuid 4023 -#define __NR_getuid 4024 -#define __NR_stime 4025 -#define __NR_ptrace 4026 -#define __NR_alarm 4027 -#define __NR_unused28 4028 -#define __NR_pause 4029 -#define __NR_utime 4030 -#define __NR_stty 4031 -#define __NR_gtty 4032 -#define __NR_access 4033 -#define __NR_nice 4034 -#define __NR_ftime 4035 -#define __NR_sync 4036 -#define __NR_kill 4037 -#define __NR_rename 4038 -#define __NR_mkdir 4039 -#define __NR_rmdir 4040 -#define __NR_dup 4041 -#define __NR_pipe 4042 -#define __NR_times 4043 -#define __NR_prof 4044 -#define __NR_brk 4045 -#define __NR_setgid 4046 -#define __NR_getgid 4047 -#define __NR_signal 4048 -#define __NR_geteuid 4049 -#define __NR_getegid 4050 -#define __NR_acct 4051 -#define __NR_umount2 4052 -#define __NR_lock 4053 -#define __NR_ioctl 4054 -#define __NR_fcntl 4055 -#define __NR_mpx 4056 -#define __NR_setpgid 4057 -#define __NR_ulimit 4058 -#define __NR_unused59 4059 -#define __NR_umask 4060 -#define __NR_chroot 4061 -#define __NR_ustat 4062 -#define __NR_dup2 4063 -#define __NR_getppid 4064 -#define __NR_getpgrp 4065 -#define __NR_setsid 4066 -#define __NR_sigaction 4067 -#define __NR_sgetmask 4068 -#define __NR_ssetmask 4069 -#define __NR_setreuid 4070 -#define __NR_setregid 4071 -#define __NR_sigsuspend 4072 -#define __NR_sigpending 4073 -#define __NR_sethostname 4074 -#define __NR_setrlimit 4075 -#define __NR_getrlimit 4076 -#define __NR_getrusage 4077 -#define __NR_gettimeofday_time32 4078 -#define __NR_settimeofday_time32 4079 -#define __NR_getgroups 4080 -#define __NR_setgroups 4081 -#define __NR_reserved82 4082 -#define __NR_symlink 4083 -#define __NR_unused84 4084 -#define __NR_readlink 4085 -#define __NR_uselib 4086 -#define __NR_swapon 4087 -#define __NR_reboot 4088 -#define __NR_readdir 4089 -#define __NR_mmap 4090 -#define __NR_munmap 4091 -#define __NR_truncate 4092 -#define __NR_ftruncate 4093 -#define __NR_fchmod 4094 -#define __NR_fchown 4095 -#define __NR_getpriority 4096 -#define __NR_setpriority 4097 -#define __NR_profil 4098 -#define __NR_statfs 4099 -#define __NR_fstatfs 4100 -#define __NR_ioperm 4101 -#define __NR_socketcall 4102 -#define __NR_syslog 4103 -#define __NR_setitimer 4104 -#define __NR_getitimer 4105 -#define __NR_stat 4106 -#define __NR_lstat 4107 -#define __NR_fstat 4108 -#define __NR_unused109 4109 -#define __NR_iopl 4110 -#define __NR_vhangup 4111 -#define __NR_idle 4112 -#define __NR_vm86 4113 -#define __NR_wait4 4114 -#define __NR_swapoff 4115 -#define __NR_sysinfo 4116 -#define __NR_ipc 4117 -#define __NR_fsync 4118 -#define __NR_sigreturn 4119 -#define __NR_clone 4120 -#define __NR_setdomainname 4121 -#define __NR_uname 4122 -#define __NR_modify_ldt 4123 -#define __NR_adjtimex 4124 -#define __NR_mprotect 4125 -#define __NR_sigprocmask 4126 -#define __NR_create_module 4127 -#define __NR_init_module 4128 -#define __NR_delete_module 4129 -#define __NR_get_kernel_syms 4130 -#define __NR_quotactl 4131 -#define __NR_getpgid 4132 -#define __NR_fchdir 4133 -#define __NR_bdflush 4134 -#define __NR_sysfs 4135 -#define __NR_personality 4136 -#define __NR_afs_syscall 4137 -#define __NR_setfsuid 4138 -#define __NR_setfsgid 4139 -#define __NR__llseek 4140 -#define __NR_getdents 4141 -#define __NR__newselect 4142 -#define __NR_flock 4143 -#define __NR_msync 4144 -#define __NR_readv 4145 -#define __NR_writev 4146 -#define __NR_cacheflush 4147 -#define __NR_cachectl 4148 -#define __NR_sysmips 4149 -#define __NR_unused150 4150 -#define __NR_getsid 4151 -#define __NR_fdatasync 4152 -#define __NR__sysctl 4153 -#define __NR_mlock 4154 -#define __NR_munlock 4155 -#define __NR_mlockall 4156 -#define __NR_munlockall 4157 -#define __NR_sched_setparam 4158 -#define __NR_sched_getparam 4159 -#define __NR_sched_setscheduler 4160 -#define __NR_sched_getscheduler 4161 -#define __NR_sched_yield 4162 -#define __NR_sched_get_priority_max 4163 -#define __NR_sched_get_priority_min 4164 -#define __NR_sched_rr_get_interval 4165 -#define __NR_nanosleep 4166 -#define __NR_mremap 4167 -#define __NR_accept 4168 -#define __NR_bind 4169 -#define __NR_connect 4170 -#define __NR_getpeername 4171 -#define __NR_getsockname 4172 -#define __NR_getsockopt 4173 -#define __NR_listen 4174 -#define __NR_recv 4175 -#define __NR_recvfrom 4176 -#define __NR_recvmsg 4177 -#define __NR_send 4178 -#define __NR_sendmsg 4179 -#define __NR_sendto 4180 -#define __NR_setsockopt 4181 -#define __NR_shutdown 4182 -#define __NR_socket 4183 -#define __NR_socketpair 4184 -#define __NR_setresuid 4185 -#define __NR_getresuid 4186 -#define __NR_query_module 4187 -#define __NR_poll 4188 -#define __NR_nfsservctl 4189 -#define __NR_setresgid 4190 -#define __NR_getresgid 4191 -#define __NR_prctl 4192 -#define __NR_rt_sigreturn 4193 -#define __NR_rt_sigaction 4194 -#define __NR_rt_sigprocmask 4195 -#define __NR_rt_sigpending 4196 -#define __NR_rt_sigtimedwait 4197 -#define __NR_rt_sigqueueinfo 4198 -#define __NR_rt_sigsuspend 4199 -#define __NR_pread64 4200 -#define __NR_pwrite64 4201 -#define __NR_chown 4202 -#define __NR_getcwd 4203 -#define __NR_capget 4204 -#define __NR_capset 4205 -#define __NR_sigaltstack 4206 -#define __NR_sendfile 4207 -#define __NR_getpmsg 4208 -#define __NR_putpmsg 4209 -#define __NR_mmap2 4210 -#define __NR_truncate64 4211 -#define __NR_ftruncate64 4212 -#define __NR_stat64 4213 -#define __NR_lstat64 4214 -#define __NR_fstat64 4215 -#define __NR_pivot_root 4216 -#define __NR_mincore 4217 -#define __NR_madvise 4218 -#define __NR_getdents64 4219 -#define __NR_fcntl64 4220 -#define __NR_reserved221 4221 -#define __NR_gettid 4222 -#define __NR_readahead 4223 -#define __NR_setxattr 4224 -#define __NR_lsetxattr 4225 -#define __NR_fsetxattr 4226 -#define __NR_getxattr 4227 -#define __NR_lgetxattr 4228 -#define __NR_fgetxattr 4229 -#define __NR_listxattr 4230 -#define __NR_llistxattr 4231 -#define __NR_flistxattr 4232 -#define __NR_removexattr 4233 -#define __NR_lremovexattr 4234 -#define __NR_fremovexattr 4235 -#define __NR_tkill 4236 -#define __NR_sendfile64 4237 -#define __NR_futex 4238 -#define __NR_sched_setaffinity 4239 -#define __NR_sched_getaffinity 4240 -#define __NR_io_setup 4241 -#define __NR_io_destroy 4242 -#define __NR_io_getevents 4243 -#define __NR_io_submit 4244 -#define __NR_io_cancel 4245 -#define __NR_exit_group 4246 -#define __NR_lookup_dcookie 4247 -#define __NR_epoll_create 4248 -#define __NR_epoll_ctl 4249 -#define __NR_epoll_wait 4250 -#define __NR_remap_file_pages 4251 -#define __NR_set_tid_address 4252 -#define __NR_restart_syscall 4253 -#define __NR_fadvise64 4254 -#define __NR_statfs64 4255 -#define __NR_fstatfs64 4256 -#define __NR_timer_create 4257 -#define __NR_timer_settime32 4258 -#define __NR_timer_gettime32 4259 -#define __NR_timer_getoverrun 4260 -#define __NR_timer_delete 4261 -#define __NR_clock_settime32 4262 -#define __NR_clock_gettime32 4263 -#define __NR_clock_getres_time32 4264 -#define __NR_clock_nanosleep_time32 4265 -#define __NR_tgkill 4266 -#define __NR_utimes 4267 -#define __NR_mbind 4268 -#define __NR_get_mempolicy 4269 -#define __NR_set_mempolicy 4270 -#define __NR_mq_open 4271 -#define __NR_mq_unlink 4272 -#define __NR_mq_timedsend 4273 -#define __NR_mq_timedreceive 4274 -#define __NR_mq_notify 4275 -#define __NR_mq_getsetattr 4276 -#define __NR_vserver 4277 -#define __NR_waitid 4278 -#define __NR_add_key 4280 -#define __NR_request_key 4281 -#define __NR_keyctl 4282 -#define __NR_set_thread_area 4283 -#define __NR_inotify_init 4284 -#define __NR_inotify_add_watch 4285 -#define __NR_inotify_rm_watch 4286 -#define __NR_migrate_pages 4287 -#define __NR_openat 4288 -#define __NR_mkdirat 4289 -#define __NR_mknodat 4290 -#define __NR_fchownat 4291 -#define __NR_futimesat 4292 -#define __NR_fstatat64 4293 -#define __NR_unlinkat 4294 -#define __NR_renameat 4295 -#define __NR_linkat 4296 -#define __NR_symlinkat 4297 -#define __NR_readlinkat 4298 -#define __NR_fchmodat 4299 -#define __NR_faccessat 4300 -#define __NR_pselect6 4301 -#define __NR_ppoll 4302 -#define __NR_unshare 4303 -#define __NR_splice 4304 -#define __NR_sync_file_range 4305 -#define __NR_tee 4306 -#define __NR_vmsplice 4307 -#define __NR_move_pages 4308 -#define __NR_set_robust_list 4309 -#define __NR_get_robust_list 4310 -#define __NR_kexec_load 4311 -#define __NR_getcpu 4312 -#define __NR_epoll_pwait 4313 -#define __NR_ioprio_set 4314 -#define __NR_ioprio_get 4315 -#define __NR_utimensat 4316 -#define __NR_signalfd 4317 -#define __NR_timerfd 4318 -#define __NR_eventfd 4319 -#define __NR_fallocate 4320 -#define __NR_timerfd_create 4321 -#define __NR_timerfd_gettime32 4322 -#define __NR_timerfd_settime32 4323 -#define __NR_signalfd4 4324 -#define __NR_eventfd2 4325 -#define __NR_epoll_create1 4326 -#define __NR_dup3 4327 -#define __NR_pipe2 4328 -#define __NR_inotify_init1 4329 -#define __NR_preadv 4330 -#define __NR_pwritev 4331 -#define __NR_rt_tgsigqueueinfo 4332 -#define __NR_perf_event_open 4333 -#define __NR_accept4 4334 -#define __NR_recvmmsg 4335 -#define __NR_fanotify_init 4336 -#define __NR_fanotify_mark 4337 -#define __NR_prlimit64 4338 -#define __NR_name_to_handle_at 4339 -#define __NR_open_by_handle_at 4340 -#define __NR_clock_adjtime 4341 -#define __NR_syncfs 4342 -#define __NR_sendmmsg 4343 -#define __NR_setns 4344 -#define __NR_process_vm_readv 4345 -#define __NR_process_vm_writev 4346 -#define __NR_kcmp 4347 -#define __NR_finit_module 4348 -#define __NR_sched_setattr 4349 -#define __NR_sched_getattr 4350 -#define __NR_renameat2 4351 -#define __NR_seccomp 4352 -#define __NR_getrandom 4353 -#define __NR_memfd_create 4354 -#define __NR_bpf 4355 -#define __NR_execveat 4356 -#define __NR_userfaultfd 4357 -#define __NR_membarrier 4358 -#define __NR_mlock2 4359 -#define __NR_copy_file_range 4360 -#define __NR_preadv2 4361 -#define __NR_pwritev2 4362 -#define __NR_pkey_mprotect 4363 -#define __NR_pkey_alloc 4364 -#define __NR_pkey_free 4365 -#define __NR_statx 4366 -#define __NR_rseq 4367 -#define __NR_io_pgetevents 4368 -#define __NR_semget 4393 -#define __NR_semctl 4394 -#define __NR_shmget 4395 -#define __NR_shmctl 4396 -#define __NR_shmat 4397 -#define __NR_shmdt 4398 -#define __NR_msgget 4399 -#define __NR_msgsnd 4400 -#define __NR_msgrcv 4401 -#define __NR_msgctl 4402 -#define __NR_clock_gettime64 4403 -#define __NR_clock_settime64 4404 -#define __NR_clock_adjtime64 4405 -#define __NR_clock_getres_time64 4406 -#define __NR_clock_nanosleep_time64 4407 -#define __NR_timer_gettime64 4408 -#define __NR_timer_settime64 4409 -#define __NR_timerfd_gettime64 4410 -#define __NR_timerfd_settime64 4411 -#define __NR_utimensat_time64 4412 -#define __NR_pselect6_time64 4413 -#define __NR_ppoll_time64 4414 -#define __NR_io_pgetevents_time64 4416 -#define __NR_recvmmsg_time64 4417 -#define __NR_mq_timedsend_time64 4418 -#define __NR_mq_timedreceive_time64 4419 -#define __NR_semtimedop_time64 4420 -#define __NR_rt_sigtimedwait_time64 4421 -#define __NR_futex_time64 4422 -#define __NR_sched_rr_get_interval_time64 4423 -#define __NR_pidfd_send_signal 4424 -#define __NR_io_uring_setup 4425 -#define __NR_io_uring_enter 4426 -#define __NR_io_uring_register 4427 -#define __NR_open_tree 4428 -#define __NR_move_mount 4429 -#define __NR_fsopen 4430 -#define __NR_fsconfig 4431 -#define __NR_fsmount 4432 -#define __NR_fspick 4433 -#define __NR_pidfd_open 4434 -#define __NR_clone3 4435 -#define __NR_close_range 4436 -#define __NR_openat2 4437 -#define __NR_pidfd_getfd 4438 -#define __NR_faccessat2 4439 -#define __NR_process_madvise 4440 -#define __NR_epoll_pwait2 4441 -#define __NR_mount_setattr 4442 -#define __NR_landlock_create_ruleset 4444 -#define __NR_landlock_add_rule 4445 -#define __NR_landlock_restrict_self 4446 -#define __NR_process_mrelease 4448 -#define __NR_futex_waitv 4449 -#define __NR_set_mempolicy_home_node 4450 -#define __NR_cachestat 4451 -#define __NR_fchmodat2 4452 - diff --git a/lib/libc/musl/arch/mips64/bits/alltypes.h.in b/lib/libc/musl/arch/mips64/bits/alltypes.h.in deleted file mode 100644 index fcd61ee853..0000000000 --- a/lib/libc/musl/arch/mips64/bits/alltypes.h.in +++ /dev/null @@ -1,22 +0,0 @@ -#define _Addr long -#define _Int64 long -#define _Reg long - -#if _MIPSEL || __MIPSEL || __MIPSEL__ -#define __BYTE_ORDER 1234 -#else -#define __BYTE_ORDER 4321 -#endif - -#define __LONG_MAX 0x7fffffffffffffffL - -#ifndef __cplusplus -TYPEDEF int wchar_t; -#endif - -TYPEDEF float float_t; -TYPEDEF double double_t; - -TYPEDEF struct { long long __ll; long double __ld; } max_align_t; - -TYPEDEF unsigned nlink_t; diff --git a/lib/libc/musl/arch/mips64/bits/syscall.h.in b/lib/libc/musl/arch/mips64/bits/syscall.h.in deleted file mode 100644 index 50cec45a46..0000000000 --- a/lib/libc/musl/arch/mips64/bits/syscall.h.in +++ /dev/null @@ -1,356 +0,0 @@ -#define __NR_read 5000 -#define __NR_write 5001 -#define __NR_open 5002 -#define __NR_close 5003 -#define __NR_stat 5004 -#define __NR_fstat 5005 -#define __NR_lstat 5006 -#define __NR_poll 5007 -#define __NR_lseek 5008 -#define __NR_mmap 5009 -#define __NR_mprotect 5010 -#define __NR_munmap 5011 -#define __NR_brk 5012 -#define __NR_rt_sigaction 5013 -#define __NR_rt_sigprocmask 5014 -#define __NR_ioctl 5015 -#define __NR_pread64 5016 -#define __NR_pwrite64 5017 -#define __NR_readv 5018 -#define __NR_writev 5019 -#define __NR_access 5020 -#define __NR_pipe 5021 -#define __NR__newselect 5022 -#define __NR_sched_yield 5023 -#define __NR_mremap 5024 -#define __NR_msync 5025 -#define __NR_mincore 5026 -#define __NR_madvise 5027 -#define __NR_shmget 5028 -#define __NR_shmat 5029 -#define __NR_shmctl 5030 -#define __NR_dup 5031 -#define __NR_dup2 5032 -#define __NR_pause 5033 -#define __NR_nanosleep 5034 -#define __NR_getitimer 5035 -#define __NR_setitimer 5036 -#define __NR_alarm 5037 -#define __NR_getpid 5038 -#define __NR_sendfile 5039 -#define __NR_socket 5040 -#define __NR_connect 5041 -#define __NR_accept 5042 -#define __NR_sendto 5043 -#define __NR_recvfrom 5044 -#define __NR_sendmsg 5045 -#define __NR_recvmsg 5046 -#define __NR_shutdown 5047 -#define __NR_bind 5048 -#define __NR_listen 5049 -#define __NR_getsockname 5050 -#define __NR_getpeername 5051 -#define __NR_socketpair 5052 -#define __NR_setsockopt 5053 -#define __NR_getsockopt 5054 -#define __NR_clone 5055 -#define __NR_fork 5056 -#define __NR_execve 5057 -#define __NR_exit 5058 -#define __NR_wait4 5059 -#define __NR_kill 5060 -#define __NR_uname 5061 -#define __NR_semget 5062 -#define __NR_semop 5063 -#define __NR_semctl 5064 -#define __NR_shmdt 5065 -#define __NR_msgget 5066 -#define __NR_msgsnd 5067 -#define __NR_msgrcv 5068 -#define __NR_msgctl 5069 -#define __NR_fcntl 5070 -#define __NR_flock 5071 -#define __NR_fsync 5072 -#define __NR_fdatasync 5073 -#define __NR_truncate 5074 -#define __NR_ftruncate 5075 -#define __NR_getdents 5076 -#define __NR_getcwd 5077 -#define __NR_chdir 5078 -#define __NR_fchdir 5079 -#define __NR_rename 5080 -#define __NR_mkdir 5081 -#define __NR_rmdir 5082 -#define __NR_creat 5083 -#define __NR_link 5084 -#define __NR_unlink 5085 -#define __NR_symlink 5086 -#define __NR_readlink 5087 -#define __NR_chmod 5088 -#define __NR_fchmod 5089 -#define __NR_chown 5090 -#define __NR_fchown 5091 -#define __NR_lchown 5092 -#define __NR_umask 5093 -#define __NR_gettimeofday 5094 -#define __NR_getrlimit 5095 -#define __NR_getrusage 5096 -#define __NR_sysinfo 5097 -#define __NR_times 5098 -#define __NR_ptrace 5099 -#define __NR_getuid 5100 -#define __NR_syslog 5101 -#define __NR_getgid 5102 -#define __NR_setuid 5103 -#define __NR_setgid 5104 -#define __NR_geteuid 5105 -#define __NR_getegid 5106 -#define __NR_setpgid 5107 -#define __NR_getppid 5108 -#define __NR_getpgrp 5109 -#define __NR_setsid 5110 -#define __NR_setreuid 5111 -#define __NR_setregid 5112 -#define __NR_getgroups 5113 -#define __NR_setgroups 5114 -#define __NR_setresuid 5115 -#define __NR_getresuid 5116 -#define __NR_setresgid 5117 -#define __NR_getresgid 5118 -#define __NR_getpgid 5119 -#define __NR_setfsuid 5120 -#define __NR_setfsgid 5121 -#define __NR_getsid 5122 -#define __NR_capget 5123 -#define __NR_capset 5124 -#define __NR_rt_sigpending 5125 -#define __NR_rt_sigtimedwait 5126 -#define __NR_rt_sigqueueinfo 5127 -#define __NR_rt_sigsuspend 5128 -#define __NR_sigaltstack 5129 -#define __NR_utime 5130 -#define __NR_mknod 5131 -#define __NR_personality 5132 -#define __NR_ustat 5133 -#define __NR_statfs 5134 -#define __NR_fstatfs 5135 -#define __NR_sysfs 5136 -#define __NR_getpriority 5137 -#define __NR_setpriority 5138 -#define __NR_sched_setparam 5139 -#define __NR_sched_getparam 5140 -#define __NR_sched_setscheduler 5141 -#define __NR_sched_getscheduler 5142 -#define __NR_sched_get_priority_max 5143 -#define __NR_sched_get_priority_min 5144 -#define __NR_sched_rr_get_interval 5145 -#define __NR_mlock 5146 -#define __NR_munlock 5147 -#define __NR_mlockall 5148 -#define __NR_munlockall 5149 -#define __NR_vhangup 5150 -#define __NR_pivot_root 5151 -#define __NR__sysctl 5152 -#define __NR_prctl 5153 -#define __NR_adjtimex 5154 -#define __NR_setrlimit 5155 -#define __NR_chroot 5156 -#define __NR_sync 5157 -#define __NR_acct 5158 -#define __NR_settimeofday 5159 -#define __NR_mount 5160 -#define __NR_umount2 5161 -#define __NR_swapon 5162 -#define __NR_swapoff 5163 -#define __NR_reboot 5164 -#define __NR_sethostname 5165 -#define __NR_setdomainname 5166 -#define __NR_create_module 5167 -#define __NR_init_module 5168 -#define __NR_delete_module 5169 -#define __NR_get_kernel_syms 5170 -#define __NR_query_module 5171 -#define __NR_quotactl 5172 -#define __NR_nfsservctl 5173 -#define __NR_getpmsg 5174 -#define __NR_putpmsg 5175 -#define __NR_afs_syscall 5176 -#define __NR_reserved177 5177 -#define __NR_gettid 5178 -#define __NR_readahead 5179 -#define __NR_setxattr 5180 -#define __NR_lsetxattr 5181 -#define __NR_fsetxattr 5182 -#define __NR_getxattr 5183 -#define __NR_lgetxattr 5184 -#define __NR_fgetxattr 5185 -#define __NR_listxattr 5186 -#define __NR_llistxattr 5187 -#define __NR_flistxattr 5188 -#define __NR_removexattr 5189 -#define __NR_lremovexattr 5190 -#define __NR_fremovexattr 5191 -#define __NR_tkill 5192 -#define __NR_reserved193 5193 -#define __NR_futex 5194 -#define __NR_sched_setaffinity 5195 -#define __NR_sched_getaffinity 5196 -#define __NR_cacheflush 5197 -#define __NR_cachectl 5198 -#define __NR_sysmips 5199 -#define __NR_io_setup 5200 -#define __NR_io_destroy 5201 -#define __NR_io_getevents 5202 -#define __NR_io_submit 5203 -#define __NR_io_cancel 5204 -#define __NR_exit_group 5205 -#define __NR_lookup_dcookie 5206 -#define __NR_epoll_create 5207 -#define __NR_epoll_ctl 5208 -#define __NR_epoll_wait 5209 -#define __NR_remap_file_pages 5210 -#define __NR_rt_sigreturn 5211 -#define __NR_set_tid_address 5212 -#define __NR_restart_syscall 5213 -#define __NR_semtimedop 5214 -#define __NR_fadvise64 5215 -#define __NR_timer_create 5216 -#define __NR_timer_settime 5217 -#define __NR_timer_gettime 5218 -#define __NR_timer_getoverrun 5219 -#define __NR_timer_delete 5220 -#define __NR_clock_settime 5221 -#define __NR_clock_gettime 5222 -#define __NR_clock_getres 5223 -#define __NR_clock_nanosleep 5224 -#define __NR_tgkill 5225 -#define __NR_utimes 5226 -#define __NR_mbind 5227 -#define __NR_get_mempolicy 5228 -#define __NR_set_mempolicy 5229 -#define __NR_mq_open 5230 -#define __NR_mq_unlink 5231 -#define __NR_mq_timedsend 5232 -#define __NR_mq_timedreceive 5233 -#define __NR_mq_notify 5234 -#define __NR_mq_getsetattr 5235 -#define __NR_vserver 5236 -#define __NR_waitid 5237 -#define __NR_add_key 5239 -#define __NR_request_key 5240 -#define __NR_keyctl 5241 -#define __NR_set_thread_area 5242 -#define __NR_inotify_init 5243 -#define __NR_inotify_add_watch 5244 -#define __NR_inotify_rm_watch 5245 -#define __NR_migrate_pages 5246 -#define __NR_openat 5247 -#define __NR_mkdirat 5248 -#define __NR_mknodat 5249 -#define __NR_fchownat 5250 -#define __NR_futimesat 5251 -#define __NR_newfstatat 5252 -#define __NR_unlinkat 5253 -#define __NR_renameat 5254 -#define __NR_linkat 5255 -#define __NR_symlinkat 5256 -#define __NR_readlinkat 5257 -#define __NR_fchmodat 5258 -#define __NR_faccessat 5259 -#define __NR_pselect6 5260 -#define __NR_ppoll 5261 -#define __NR_unshare 5262 -#define __NR_splice 5263 -#define __NR_sync_file_range 5264 -#define __NR_tee 5265 -#define __NR_vmsplice 5266 -#define __NR_move_pages 5267 -#define __NR_set_robust_list 5268 -#define __NR_get_robust_list 5269 -#define __NR_kexec_load 5270 -#define __NR_getcpu 5271 -#define __NR_epoll_pwait 5272 -#define __NR_ioprio_set 5273 -#define __NR_ioprio_get 5274 -#define __NR_utimensat 5275 -#define __NR_signalfd 5276 -#define __NR_timerfd 5277 -#define __NR_eventfd 5278 -#define __NR_fallocate 5279 -#define __NR_timerfd_create 5280 -#define __NR_timerfd_gettime 5281 -#define __NR_timerfd_settime 5282 -#define __NR_signalfd4 5283 -#define __NR_eventfd2 5284 -#define __NR_epoll_create1 5285 -#define __NR_dup3 5286 -#define __NR_pipe2 5287 -#define __NR_inotify_init1 5288 -#define __NR_preadv 5289 -#define __NR_pwritev 5290 -#define __NR_rt_tgsigqueueinfo 5291 -#define __NR_perf_event_open 5292 -#define __NR_accept4 5293 -#define __NR_recvmmsg 5294 -#define __NR_fanotify_init 5295 -#define __NR_fanotify_mark 5296 -#define __NR_prlimit64 5297 -#define __NR_name_to_handle_at 5298 -#define __NR_open_by_handle_at 5299 -#define __NR_clock_adjtime 5300 -#define __NR_syncfs 5301 -#define __NR_sendmmsg 5302 -#define __NR_setns 5303 -#define __NR_process_vm_readv 5304 -#define __NR_process_vm_writev 5305 -#define __NR_kcmp 5306 -#define __NR_finit_module 5307 -#define __NR_getdents64 5308 -#define __NR_sched_setattr 5309 -#define __NR_sched_getattr 5310 -#define __NR_renameat2 5311 -#define __NR_seccomp 5312 -#define __NR_getrandom 5313 -#define __NR_memfd_create 5314 -#define __NR_bpf 5315 -#define __NR_execveat 5316 -#define __NR_userfaultfd 5317 -#define __NR_membarrier 5318 -#define __NR_mlock2 5319 -#define __NR_copy_file_range 5320 -#define __NR_preadv2 5321 -#define __NR_pwritev2 5322 -#define __NR_pkey_mprotect 5323 -#define __NR_pkey_alloc 5324 -#define __NR_pkey_free 5325 -#define __NR_statx 5326 -#define __NR_rseq 5327 -#define __NR_io_pgetevents 5328 -#define __NR_pidfd_send_signal 5424 -#define __NR_io_uring_setup 5425 -#define __NR_io_uring_enter 5426 -#define __NR_io_uring_register 5427 -#define __NR_open_tree 5428 -#define __NR_move_mount 5429 -#define __NR_fsopen 5430 -#define __NR_fsconfig 5431 -#define __NR_fsmount 5432 -#define __NR_fspick 5433 -#define __NR_pidfd_open 5434 -#define __NR_clone3 5435 -#define __NR_close_range 5436 -#define __NR_openat2 5437 -#define __NR_pidfd_getfd 5438 -#define __NR_faccessat2 5439 -#define __NR_process_madvise 5440 -#define __NR_epoll_pwait2 5441 -#define __NR_mount_setattr 5442 -#define __NR_landlock_create_ruleset 5444 -#define __NR_landlock_add_rule 5445 -#define __NR_landlock_restrict_self 5446 -#define __NR_process_mrelease 5448 -#define __NR_futex_waitv 5449 -#define __NR_set_mempolicy_home_node 5450 -#define __NR_cachestat 5451 -#define __NR_fchmodat2 5452 - diff --git a/lib/libc/musl/arch/mipsn32/atomic_arch.h b/lib/libc/musl/arch/mipsn32/atomic_arch.h new file mode 100644 index 0000000000..ccc3878cc5 --- /dev/null +++ b/lib/libc/musl/arch/mipsn32/atomic_arch.h @@ -0,0 +1,52 @@ +#if __mips_isa_rev < 6 +#define LLSC_M "m" +#else +#define LLSC_M "ZC" +#endif + +#define a_ll a_ll +static inline int a_ll(volatile int *p) +{ + int v; +#if __mips < 2 + __asm__ __volatile__ ( + ".set push ; .set mips2\n\t" + "ll %0, %1" + "\n\t.set pop" + : "=r"(v) : "m"(*p)); +#else + __asm__ __volatile__ ( + "ll %0, %1" + : "=r"(v) : LLSC_M(*p)); +#endif + return v; +} + +#define a_sc a_sc +static inline int a_sc(volatile int *p, int v) +{ + int r; +#if __mips < 2 + __asm__ __volatile__ ( + ".set push ; .set mips2\n\t" + "sc %0, %1" + "\n\t.set pop" + : "=r"(r), "=m"(*p) : "0"(v) : "memory"); +#else + __asm__ __volatile__ ( + "sc %0, %1" + : "=r"(r), "="LLSC_M(*p) : "0"(v) : "memory"); +#endif + return r; +} + +#define a_barrier a_barrier +static inline void a_barrier() +{ + __asm__ __volatile__ ("sync" : : : "memory"); +} + +#define a_pre_llsc a_barrier +#define a_post_llsc a_barrier + +#undef LLSC_M diff --git a/lib/libc/musl/arch/mipsn32/bits/errno.h b/lib/libc/musl/arch/mipsn32/bits/errno.h new file mode 100644 index 0000000000..1bb91e3d77 --- /dev/null +++ b/lib/libc/musl/arch/mipsn32/bits/errno.h @@ -0,0 +1,134 @@ +#define EPERM 1 +#define ENOENT 2 +#define ESRCH 3 +#define EINTR 4 +#define EIO 5 +#define ENXIO 6 +#define E2BIG 7 +#define ENOEXEC 8 +#define EBADF 9 +#define ECHILD 10 +#define EAGAIN 11 +#define ENOMEM 12 +#define EACCES 13 +#define EFAULT 14 +#define ENOTBLK 15 +#define EBUSY 16 +#define EEXIST 17 +#define EXDEV 18 +#define ENODEV 19 +#define ENOTDIR 20 +#define EISDIR 21 +#define EINVAL 22 +#define ENFILE 23 +#define EMFILE 24 +#define ENOTTY 25 +#define ETXTBSY 26 +#define EFBIG 27 +#define ENOSPC 28 +#define ESPIPE 29 +#define EROFS 30 +#define EMLINK 31 +#define EPIPE 32 +#define EDOM 33 +#define ERANGE 34 +#define ENOMSG 35 +#define EIDRM 36 +#define ECHRNG 37 +#define EL2NSYNC 38 +#define EL3HLT 39 +#define EL3RST 40 +#define ELNRNG 41 +#define EUNATCH 42 +#define ENOCSI 43 +#define EL2HLT 44 +#define EDEADLK 45 +#define ENOLCK 46 +#define EBADE 50 +#define EBADR 51 +#define EXFULL 52 +#define ENOANO 53 +#define EBADRQC 54 +#define EBADSLT 55 +#define EDEADLOCK 56 +#define EBFONT 59 +#define ENOSTR 60 +#define ENODATA 61 +#define ETIME 62 +#define ENOSR 63 +#define ENONET 64 +#define ENOPKG 65 +#define EREMOTE 66 +#define ENOLINK 67 +#define EADV 68 +#define ESRMNT 69 +#define ECOMM 70 +#define EPROTO 71 +#define EDOTDOT 73 +#define EMULTIHOP 74 +#define EBADMSG 77 +#define ENAMETOOLONG 78 +#define EOVERFLOW 79 +#define ENOTUNIQ 80 +#define EBADFD 81 +#define EREMCHG 82 +#define ELIBACC 83 +#define ELIBBAD 84 +#define ELIBSCN 85 +#define ELIBMAX 86 +#define ELIBEXEC 87 +#define EILSEQ 88 +#define ENOSYS 89 +#define ELOOP 90 +#define ERESTART 91 +#define ESTRPIPE 92 +#define ENOTEMPTY 93 +#define EUSERS 94 +#define ENOTSOCK 95 +#define EDESTADDRREQ 96 +#define EMSGSIZE 97 +#define EPROTOTYPE 98 +#define ENOPROTOOPT 99 +#define EPROTONOSUPPORT 120 +#define ESOCKTNOSUPPORT 121 +#define EOPNOTSUPP 122 +#define ENOTSUP EOPNOTSUPP +#define EPFNOSUPPORT 123 +#define EAFNOSUPPORT 124 +#define EADDRINUSE 125 +#define EADDRNOTAVAIL 126 +#define ENETDOWN 127 +#define ENETUNREACH 128 +#define ENETRESET 129 +#define ECONNABORTED 130 +#define ECONNRESET 131 +#define ENOBUFS 132 +#define EISCONN 133 +#define ENOTCONN 134 +#define EUCLEAN 135 +#define ENOTNAM 137 +#define ENAVAIL 138 +#define EISNAM 139 +#define EREMOTEIO 140 +#define ESHUTDOWN 143 +#define ETOOMANYREFS 144 +#define ETIMEDOUT 145 +#define ECONNREFUSED 146 +#define EHOSTDOWN 147 +#define EHOSTUNREACH 148 +#define EWOULDBLOCK EAGAIN +#define EALREADY 149 +#define EINPROGRESS 150 +#define ESTALE 151 +#define ECANCELED 158 +#define ENOMEDIUM 159 +#define EMEDIUMTYPE 160 +#define ENOKEY 161 +#define EKEYEXPIRED 162 +#define EKEYREVOKED 163 +#define EKEYREJECTED 164 +#define EOWNERDEAD 165 +#define ENOTRECOVERABLE 166 +#define ERFKILL 167 +#define EHWPOISON 168 +#define EDQUOT 1133 diff --git a/lib/libc/musl/arch/mipsn32/bits/fcntl.h b/lib/libc/musl/arch/mipsn32/bits/fcntl.h new file mode 100644 index 0000000000..9fd8c23e27 --- /dev/null +++ b/lib/libc/musl/arch/mipsn32/bits/fcntl.h @@ -0,0 +1,40 @@ +#define O_CREAT 0400 +#define O_EXCL 02000 +#define O_NOCTTY 04000 +#define O_TRUNC 01000 +#define O_APPEND 0010 +#define O_NONBLOCK 0200 +#define O_DSYNC 0020 +#define O_SYNC 040020 +#define O_RSYNC 040020 +#define O_DIRECTORY 0200000 +#define O_NOFOLLOW 0400000 +#define O_CLOEXEC 02000000 + +#define O_ASYNC 010000 +#define O_DIRECT 0100000 +#define O_LARGEFILE 020000 +#define O_NOATIME 01000000 +#define O_PATH 010000000 +#define O_TMPFILE 020200000 +#define O_NDELAY O_NONBLOCK + +#define F_DUPFD 0 +#define F_GETFD 1 +#define F_SETFD 2 +#define F_GETFL 3 +#define F_SETFL 4 + +#define F_SETOWN 24 +#define F_GETOWN 23 +#define F_SETSIG 10 +#define F_GETSIG 11 + +#define F_GETLK 33 +#define F_SETLK 34 +#define F_SETLKW 35 + +#define F_SETOWN_EX 15 +#define F_GETOWN_EX 16 + +#define F_GETOWNER_UIDS 17 diff --git a/lib/libc/musl/arch/mipsn32/bits/fenv.h b/lib/libc/musl/arch/mipsn32/bits/fenv.h new file mode 100644 index 0000000000..589e71c1bf --- /dev/null +++ b/lib/libc/musl/arch/mipsn32/bits/fenv.h @@ -0,0 +1,25 @@ +#ifdef __mips_soft_float +#define FE_ALL_EXCEPT 0 +#define FE_TONEAREST 0 +#else +#define FE_INEXACT 4 +#define FE_UNDERFLOW 8 +#define FE_OVERFLOW 16 +#define FE_DIVBYZERO 32 +#define FE_INVALID 64 + +#define FE_ALL_EXCEPT 124 + +#define FE_TONEAREST 0 +#define FE_TOWARDZERO 1 +#define FE_UPWARD 2 +#define FE_DOWNWARD 3 +#endif + +typedef unsigned short fexcept_t; + +typedef struct { + unsigned __cw; +} fenv_t; + +#define FE_DFL_ENV ((const fenv_t *) -1) diff --git a/lib/libc/musl/arch/mipsn32/bits/float.h b/lib/libc/musl/arch/mipsn32/bits/float.h new file mode 100644 index 0000000000..719c79085a --- /dev/null +++ b/lib/libc/musl/arch/mipsn32/bits/float.h @@ -0,0 +1,16 @@ +#define FLT_EVAL_METHOD 0 + +#define LDBL_TRUE_MIN 6.47517511943802511092443895822764655e-4966L +#define LDBL_MIN 3.36210314311209350626267781732175260e-4932L +#define LDBL_MAX 1.18973149535723176508575932662800702e+4932L +#define LDBL_EPSILON 1.92592994438723585305597794258492732e-34L + +#define LDBL_MANT_DIG 113 +#define LDBL_MIN_EXP (-16381) +#define LDBL_MAX_EXP 16384 + +#define LDBL_DIG 33 +#define LDBL_MIN_10_EXP (-4931) +#define LDBL_MAX_10_EXP 4932 + +#define DECIMAL_DIG 36 diff --git a/lib/libc/musl/arch/mipsn32/bits/hwcap.h b/lib/libc/musl/arch/mipsn32/bits/hwcap.h new file mode 100644 index 0000000000..13e86fe702 --- /dev/null +++ b/lib/libc/musl/arch/mipsn32/bits/hwcap.h @@ -0,0 +1,3 @@ +#define HWCAP_MIPS_R6 (1 << 0) +#define HWCAP_MIPS_MSA (1 << 1) +#define HWCAP_MIPS_CRC32 (1 << 2) diff --git a/lib/libc/musl/arch/mipsn32/bits/ioctl.h b/lib/libc/musl/arch/mipsn32/bits/ioctl.h new file mode 100644 index 0000000000..e20bf19eaa --- /dev/null +++ b/lib/libc/musl/arch/mipsn32/bits/ioctl.h @@ -0,0 +1,114 @@ +#define _IOC(a,b,c,d) ( ((a)<<29) | ((b)<<8) | (c) | ((d)<<16) ) +#define _IOC_NONE 1U +#define _IOC_READ 2U +#define _IOC_WRITE 4U + +#define _IO(a,b) _IOC(_IOC_NONE,(a),(b),0) +#define _IOW(a,b,c) _IOC(_IOC_WRITE,(a),(b),sizeof(c)) +#define _IOR(a,b,c) _IOC(_IOC_READ,(a),(b),sizeof(c)) +#define _IOWR(a,b,c) _IOC(_IOC_READ|_IOC_WRITE,(a),(b),sizeof(c)) + +#define TCGETA 0x5401 +#define TCSETA 0x5402 +#define TCSETAW 0x5403 +#define TCSETAF 0x5404 +#define TCSBRK 0x5405 +#define TCXONC 0x5406 +#define TCFLSH 0x5407 +#define TCGETS 0x540D +#define TCSETS 0x540E +#define TCSETSW 0x540F +#define TCSETSF 0x5410 + +#define TIOCEXCL 0x740D +#define TIOCNXCL 0x740E +#define TIOCOUTQ 0x7472 +#define TIOCSTI 0x5472 +#define TIOCMGET 0x741D +#define TIOCMBIS 0x741B +#define TIOCMBIC 0x741C +#define TIOCMSET 0x741A + +#define TIOCPKT 0x5470 +#define TIOCSWINSZ _IOW('t', 103, struct winsize) +#define TIOCGWINSZ _IOR('t', 104, struct winsize) +#define TIOCNOTTY 0x5471 +#define TIOCSETD 0x7401 +#define TIOCGETD 0x7400 + +#define FIOCLEX 0x6601 +#define FIONCLEX 0x6602 +#define FIOASYNC 0x667D +#define FIONBIO 0x667E +#define FIOQSIZE 0x667F + +#define TIOCGLTC 0x7474 +#define TIOCSLTC 0x7475 +#define TIOCSPGRP _IOW('t', 118, int) +#define TIOCGPGRP _IOR('t', 119, int) +#define TIOCCONS _IOW('t', 120, int) + +#define FIONREAD 0x467F +#define TIOCINQ FIONREAD + +#define TIOCGETP 0x7408 +#define TIOCSETP 0x7409 +#define TIOCSETN 0x740A + +#define TIOCSBRK 0x5427 +#define TIOCCBRK 0x5428 +#define TIOCGSID 0x7416 +#define TIOCGRS485 _IOR('T', 0x2E, char[32]) +#define TIOCSRS485 _IOWR('T', 0x2F, char[32]) +#define TIOCGPTN _IOR('T', 0x30, unsigned int) +#define TIOCSPTLCK _IOW('T', 0x31, int) +#define TIOCGDEV _IOR('T', 0x32, unsigned int) +#define TIOCSIG _IOW('T', 0x36, int) +#define TIOCVHANGUP 0x5437 +#define TIOCGPKT _IOR('T', 0x38, int) +#define TIOCGPTLCK _IOR('T', 0x39, int) +#define TIOCGEXCL _IOR('T', 0x40, int) +#define TIOCGPTPEER _IO('T', 0x41) + +#define TIOCSCTTY 0x5480 +#define TIOCGSOFTCAR 0x5481 +#define TIOCSSOFTCAR 0x5482 +#define TIOCLINUX 0x5483 +#define TIOCGSERIAL 0x5484 +#define TIOCSSERIAL 0x5485 +#define TCSBRKP 0x5486 + +#define TIOCSERCONFIG 0x5488 +#define TIOCSERGWILD 0x5489 +#define TIOCSERSWILD 0x548A +#define TIOCGLCKTRMIOS 0x548B +#define TIOCSLCKTRMIOS 0x548C +#define TIOCSERGSTRUCT 0x548D +#define TIOCSERGETLSR 0x548E +#define TIOCSERGETMULTI 0x548F +#define TIOCSERSETMULTI 0x5490 +#define TIOCMIWAIT 0x5491 +#define TIOCGICOUNT 0x5492 + +#define TIOCM_LE 0x001 +#define TIOCM_DTR 0x002 +#define TIOCM_RTS 0x004 +#define TIOCM_ST 0x010 +#define TIOCM_SR 0x020 +#define TIOCM_CTS 0x040 +#define TIOCM_CAR 0x100 +#define TIOCM_CD TIOCM_CAR +#define TIOCM_RNG 0x200 +#define TIOCM_RI TIOCM_RNG +#define TIOCM_DSR 0x400 +#define TIOCM_OUT1 0x2000 +#define TIOCM_OUT2 0x4000 +#define TIOCM_LOOP 0x8000 + +#define FIOGETOWN _IOR('f', 123, int) +#define FIOSETOWN _IOW('f', 124, int) +#define SIOCATMARK _IOR('s', 7, int) +#define SIOCSPGRP _IOW('s', 8, pid_t) +#define SIOCGPGRP _IOR('s', 9, pid_t) +#define SIOCGSTAMP _IOR(0x89, 6, char[16]) +#define SIOCGSTAMPNS _IOR(0x89, 7, char[16]) diff --git a/lib/libc/musl/arch/mipsn32/bits/ipcstat.h b/lib/libc/musl/arch/mipsn32/bits/ipcstat.h new file mode 100644 index 0000000000..4f4fcb0c5b --- /dev/null +++ b/lib/libc/musl/arch/mipsn32/bits/ipcstat.h @@ -0,0 +1 @@ +#define IPC_STAT 0x102 diff --git a/lib/libc/musl/arch/mipsn32/bits/mman.h b/lib/libc/musl/arch/mipsn32/bits/mman.h new file mode 100644 index 0000000000..9027bb6376 --- /dev/null +++ b/lib/libc/musl/arch/mipsn32/bits/mman.h @@ -0,0 +1,25 @@ +#undef MAP_ANON +#define MAP_ANON 0x800 +#undef MAP_NORESERVE +#define MAP_NORESERVE 0x0400 +#undef MAP_GROWSDOWN +#define MAP_GROWSDOWN 0x1000 +#undef MAP_DENYWRITE +#define MAP_DENYWRITE 0x2000 +#undef MAP_EXECUTABLE +#define MAP_EXECUTABLE 0x4000 +#undef MAP_LOCKED +#define MAP_LOCKED 0x8000 +#undef MAP_POPULATE +#define MAP_POPULATE 0x10000 +#undef MAP_NONBLOCK +#define MAP_NONBLOCK 0x20000 +#undef MAP_STACK +#define MAP_STACK 0x40000 +#undef MAP_HUGETLB +#define MAP_HUGETLB 0x80000 +#undef MAP_SYNC + +#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) +#undef MADV_SOFT_OFFLINE +#endif diff --git a/lib/libc/musl/arch/mipsn32/bits/msg.h b/lib/libc/musl/arch/mipsn32/bits/msg.h new file mode 100644 index 0000000000..c734dbb570 --- /dev/null +++ b/lib/libc/musl/arch/mipsn32/bits/msg.h @@ -0,0 +1,27 @@ +struct msqid_ds { + struct ipc_perm msg_perm; +#if _MIPSEL || __MIPSEL || __MIPSEL__ + unsigned long __msg_stime_lo; + unsigned long __msg_stime_hi; + unsigned long __msg_rtime_lo; + unsigned long __msg_rtime_hi; + unsigned long __msg_ctime_lo; + unsigned long __msg_ctime_hi; +#else + unsigned long __msg_stime_hi; + unsigned long __msg_stime_lo; + unsigned long __msg_rtime_hi; + unsigned long __msg_rtime_lo; + unsigned long __msg_ctime_hi; + unsigned long __msg_ctime_lo; +#endif + unsigned long msg_cbytes; + msgqnum_t msg_qnum; + msglen_t msg_qbytes; + pid_t msg_lspid; + pid_t msg_lrpid; + unsigned long __unused[2]; + time_t msg_stime; + time_t msg_rtime; + time_t msg_ctime; +}; diff --git a/lib/libc/musl/arch/mipsn32/bits/poll.h b/lib/libc/musl/arch/mipsn32/bits/poll.h new file mode 100644 index 0000000000..b0b1ed621e --- /dev/null +++ b/lib/libc/musl/arch/mipsn32/bits/poll.h @@ -0,0 +1,2 @@ +#define POLLWRNORM POLLOUT +#define POLLWRBAND 0x100 diff --git a/lib/libc/musl/arch/mipsn32/bits/posix.h b/lib/libc/musl/arch/mipsn32/bits/posix.h new file mode 100644 index 0000000000..30a38714f3 --- /dev/null +++ b/lib/libc/musl/arch/mipsn32/bits/posix.h @@ -0,0 +1,2 @@ +#define _POSIX_V6_ILP32_OFFBIG 1 +#define _POSIX_V7_ILP32_OFFBIG 1 diff --git a/lib/libc/musl/arch/mipsn32/bits/ptrace.h b/lib/libc/musl/arch/mipsn32/bits/ptrace.h new file mode 100644 index 0000000000..77a01c064e --- /dev/null +++ b/lib/libc/musl/arch/mipsn32/bits/ptrace.h @@ -0,0 +1,9 @@ +#define PTRACE_GET_THREAD_AREA 25 +#define PTRACE_SET_THREAD_AREA 26 +#define PTRACE_PEEKTEXT_3264 0xc0 +#define PTRACE_PEEKDATA_3264 0xc1 +#define PTRACE_POKETEXT_3264 0xc2 +#define PTRACE_POKEDATA_3264 0xc3 +#define PTRACE_GET_THREAD_AREA_3264 0xc4 +#define PTRACE_GET_WATCH_REGS 0xd0 +#define PTRACE_SET_WATCH_REGS 0xd1 diff --git a/lib/libc/musl/arch/mipsn32/bits/reg.h b/lib/libc/musl/arch/mipsn32/bits/reg.h new file mode 100644 index 0000000000..a3f63accf7 --- /dev/null +++ b/lib/libc/musl/arch/mipsn32/bits/reg.h @@ -0,0 +1,47 @@ +#undef __WORDSIZE +#define __WORDSIZE 64 + +#define EF_R0 0 +#define EF_R1 1 +#define EF_R2 2 +#define EF_R3 3 +#define EF_R4 4 +#define EF_R5 5 +#define EF_R6 6 +#define EF_R7 7 +#define EF_R8 8 +#define EF_R9 9 +#define EF_R10 10 +#define EF_R11 11 +#define EF_R12 12 +#define EF_R13 13 +#define EF_R14 14 +#define EF_R15 15 +#define EF_R16 16 +#define EF_R17 17 +#define EF_R18 18 +#define EF_R19 19 +#define EF_R20 20 +#define EF_R21 21 +#define EF_R22 22 +#define EF_R23 23 +#define EF_R24 24 +#define EF_R25 25 + +#define EF_R26 26 +#define EF_R27 27 +#define EF_R28 28 +#define EF_R29 29 +#define EF_R30 30 +#define EF_R31 31 + +#define EF_LO 32 +#define EF_HI 33 + +#define EF_CP0_EPC 34 +#define EF_CP0_BADVADDR 35 +#define EF_CP0_STATUS 36 +#define EF_CP0_CAUSE 37 +#define EF_UNUSED0 38 + +#define EF_SIZE 304 diff --git a/lib/libc/musl/arch/mipsn32/bits/resource.h b/lib/libc/musl/arch/mipsn32/bits/resource.h new file mode 100644 index 0000000000..414a405417 --- /dev/null +++ b/lib/libc/musl/arch/mipsn32/bits/resource.h @@ -0,0 +1,5 @@ +#define RLIMIT_NOFILE 5 +#define RLIMIT_AS 6 +#define RLIMIT_RSS 7 +#define RLIMIT_NPROC 8 +#define RLIMIT_MEMLOCK 9 diff --git a/lib/libc/musl/arch/mipsn32/bits/sem.h b/lib/libc/musl/arch/mipsn32/bits/sem.h new file mode 100644 index 0000000000..fe6f094858 --- /dev/null +++ b/lib/libc/musl/arch/mipsn32/bits/sem.h @@ -0,0 +1,16 @@ +struct semid_ds { + struct ipc_perm sem_perm; + unsigned long __sem_otime_lo; + unsigned long __sem_ctime_lo; +#if __BYTE_ORDER == __LITTLE_ENDIAN + unsigned short sem_nsems; + char __sem_nsems_pad[sizeof(long)-sizeof(short)]; +#else + char __sem_nsems_pad[sizeof(long)-sizeof(short)]; + unsigned short sem_nsems; +#endif + unsigned long __sem_otime_hi; + unsigned long __sem_ctime_hi; + time_t sem_otime; + time_t sem_ctime; +}; diff --git a/lib/libc/musl/arch/mipsn32/bits/setjmp.h b/lib/libc/musl/arch/mipsn32/bits/setjmp.h new file mode 100644 index 0000000000..4d93267e61 --- /dev/null +++ b/lib/libc/musl/arch/mipsn32/bits/setjmp.h @@ -0,0 +1 @@ +typedef unsigned long long __jmp_buf[23]; diff --git a/lib/libc/musl/arch/mipsn32/bits/shm.h b/lib/libc/musl/arch/mipsn32/bits/shm.h new file mode 100644 index 0000000000..ab8c642d82 --- /dev/null +++ b/lib/libc/musl/arch/mipsn32/bits/shm.h @@ -0,0 +1,29 @@ +#define SHMLBA 4096 + +struct shmid_ds { + struct ipc_perm shm_perm; + size_t shm_segsz; + unsigned long __shm_atime_lo; + unsigned long __shm_dtime_lo; + unsigned long __shm_ctime_lo; + pid_t shm_cpid; + pid_t shm_lpid; + unsigned long shm_nattch; + unsigned short __shm_atime_hi; + unsigned short __shm_dtime_hi; + unsigned short __shm_ctime_hi; + unsigned short __pad1; + time_t shm_atime; + time_t shm_dtime; + time_t shm_ctime; +}; + +struct shminfo { + unsigned long shmmax, shmmin, shmmni, shmseg, shmall, __unused[4]; +}; + +struct shm_info { + int __used_ids; + unsigned long shm_tot, shm_rss, shm_swp; + unsigned long __swap_attempts, __swap_successes; +}; diff --git a/lib/libc/musl/arch/mipsn32/bits/signal.h b/lib/libc/musl/arch/mipsn32/bits/signal.h new file mode 100644 index 0000000000..ffec7fd014 --- /dev/null +++ b/lib/libc/musl/arch/mipsn32/bits/signal.h @@ -0,0 +1,142 @@ +#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ + || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) + +#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) +#define MINSIGSTKSZ 2048 +#define SIGSTKSZ 8192 +#endif + +#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) +typedef unsigned long long greg_t, gregset_t[32]; + +typedef struct { + union { + double fp_dregs[32]; + struct { + float _fp_fregs; + unsigned _fp_pad; + } fp_fregs[32]; + } fp_r; +} fpregset_t; + +struct sigcontext { + unsigned long long sc_regs[32]; + unsigned long long sc_fpregs[32]; + unsigned long long sc_mdhi; + unsigned long long sc_hi1; + unsigned long long sc_hi2; + unsigned long long sc_hi3; + unsigned long long sc_mdlo; + unsigned long long sc_lo1; + unsigned long long sc_lo2; + unsigned long long sc_lo3; + unsigned long long sc_pc; + unsigned int sc_fpc_csr; + unsigned int sc_used_math; + unsigned int sc_dsp; + unsigned int sc_reserved; +}; + +typedef struct { + gregset_t gregs; + fpregset_t fpregs; + greg_t mdhi; + greg_t hi1; + greg_t hi2; + greg_t hi3; + greg_t mdlo; + greg_t lo1; + greg_t lo2; + greg_t lo3; + greg_t pc; + unsigned int fpc_csr; + unsigned int used_math; + unsigned int dsp; + unsigned int reserved; +} mcontext_t; + +#else +typedef struct { + unsigned long long __mc1[32]; + double __mc2[32]; + unsigned long long __mc3[9]; + unsigned __mc4[4]; +} mcontext_t; +#endif + +struct sigaltstack { + void *ss_sp; + size_t ss_size; + int ss_flags; +}; + +typedef struct __ucontext { + unsigned long uc_flags; + struct __ucontext *uc_link; + stack_t uc_stack; + mcontext_t uc_mcontext; + sigset_t uc_sigmask; +} ucontext_t; + +#define SA_NOCLDSTOP 1 +#define SA_NOCLDWAIT 0x10000 +#define SA_SIGINFO 8 +#define SA_ONSTACK 0x08000000 +#define SA_RESTART 0x10000000 +#define SA_NODEFER 0x40000000 +#define SA_RESETHAND 0x80000000 + +#undef SIG_BLOCK +#undef SIG_UNBLOCK +#undef SIG_SETMASK +#define SIG_BLOCK 1 +#define SIG_UNBLOCK 2 +#define SIG_SETMASK 3 + +#undef SI_ASYNCIO +#undef SI_MESGQ +#undef SI_TIMER +#define SI_ASYNCIO (-2) +#define SI_MESGQ (-4) +#define SI_TIMER (-3) + +#define __SI_SWAP_ERRNO_CODE + +#endif + +#define SIGHUP 1 +#define SIGINT 2 +#define SIGQUIT 3 +#define SIGILL 4 +#define SIGTRAP 5 +#define SIGABRT 6 +#define SIGIOT SIGABRT +#define SIGEMT 7 +#define SIGFPE 8 +#define SIGKILL 9 +#define SIGBUS 10 +#define SIGSEGV 11 +#define SIGSYS 12 +#define SIGPIPE 13 +#define SIGALRM 14 +#define SIGTERM 15 +#define SIGUSR1 16 +#define SIGUSR2 17 +#define SIGCHLD 18 +#define SIGPWR 19 +#define SIGWINCH 20 +#define SIGURG 21 +#define SIGIO 22 +#define SIGPOLL SIGIO +#define SIGSTOP 23 +#define SIGTSTP 24 +#define SIGCONT 25 +#define SIGTTIN 26 +#define SIGTTOU 27 +#define SIGVTALRM 28 +#define SIGPROF 29 +#define SIGXCPU 30 +#define SIGXFSZ 31 +#define SIGUNUSED SIGSYS + +#define _NSIG 128 diff --git a/lib/libc/musl/arch/mipsn32/bits/socket.h b/lib/libc/musl/arch/mipsn32/bits/socket.h new file mode 100644 index 0000000000..02fbb88b4d --- /dev/null +++ b/lib/libc/musl/arch/mipsn32/bits/socket.h @@ -0,0 +1,35 @@ +#define SOCK_STREAM 2 +#define SOCK_DGRAM 1 + +#define SOL_SOCKET 65535 + +#define SO_DEBUG 1 + +#define SO_REUSEADDR 0x0004 +#define SO_KEEPALIVE 0x0008 +#define SO_DONTROUTE 0x0010 +#define SO_BROADCAST 0x0020 +#define SO_LINGER 0x0080 +#define SO_OOBINLINE 0x0100 +#define SO_REUSEPORT 0x0200 +#define SO_SNDBUF 0x1001 +#define SO_RCVBUF 0x1002 +#define SO_SNDLOWAT 0x1003 +#define SO_RCVLOWAT 0x1004 +#define SO_ERROR 0x1007 +#define SO_TYPE 0x1008 +#define SO_ACCEPTCONN 0x1009 +#define SO_PROTOCOL 0x1028 +#define SO_DOMAIN 0x1029 + +#define SO_NO_CHECK 11 +#define SO_PRIORITY 12 +#define SO_BSDCOMPAT 14 +#define SO_PASSCRED 17 +#define SO_PEERCRED 18 +#define SO_PEERSEC 30 +#define SO_SNDBUFFORCE 31 +#define SO_RCVBUFFORCE 33 + +#define SOCK_NONBLOCK 0200 +#define SOCK_CLOEXEC 02000000 diff --git a/lib/libc/musl/arch/mipsn32/bits/stat.h b/lib/libc/musl/arch/mipsn32/bits/stat.h new file mode 100644 index 0000000000..6e2f280868 --- /dev/null +++ b/lib/libc/musl/arch/mipsn32/bits/stat.h @@ -0,0 +1,23 @@ +struct stat { + dev_t st_dev; + long __pad1[2]; + ino_t st_ino; + mode_t st_mode; + nlink_t st_nlink; + uid_t st_uid; + gid_t st_gid; + dev_t st_rdev; + long __pad2[2]; + off_t st_size; + struct { + long tv_sec; + long tv_nsec; + } __st_atim32, __st_mtim32, __st_ctim32; + blksize_t st_blksize; + long __pad3; + blkcnt_t st_blocks; + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; + long __pad4[2]; +}; diff --git a/lib/libc/musl/arch/mipsn32/bits/statfs.h b/lib/libc/musl/arch/mipsn32/bits/statfs.h new file mode 100644 index 0000000000..a73bd547cd --- /dev/null +++ b/lib/libc/musl/arch/mipsn32/bits/statfs.h @@ -0,0 +1,8 @@ +struct statfs { + unsigned long f_type, f_bsize, f_frsize; + fsblkcnt_t f_blocks, f_bfree; + fsfilcnt_t f_files, f_ffree; + fsblkcnt_t f_bavail; + fsid_t f_fsid; + unsigned long f_namelen, f_flags, f_spare[5]; +}; diff --git a/lib/libc/musl/arch/mipsn32/bits/stdint.h b/lib/libc/musl/arch/mipsn32/bits/stdint.h new file mode 100644 index 0000000000..d1b2712199 --- /dev/null +++ b/lib/libc/musl/arch/mipsn32/bits/stdint.h @@ -0,0 +1,20 @@ +typedef int32_t int_fast16_t; +typedef int32_t int_fast32_t; +typedef uint32_t uint_fast16_t; +typedef uint32_t uint_fast32_t; + +#define INT_FAST16_MIN INT32_MIN +#define INT_FAST32_MIN INT32_MIN + +#define INT_FAST16_MAX INT32_MAX +#define INT_FAST32_MAX INT32_MAX + +#define UINT_FAST16_MAX UINT32_MAX +#define UINT_FAST32_MAX UINT32_MAX + +#define INTPTR_MIN INT32_MIN +#define INTPTR_MAX INT32_MAX +#define UINTPTR_MAX UINT32_MAX +#define PTRDIFF_MIN INT32_MIN +#define PTRDIFF_MAX INT32_MAX +#define SIZE_MAX UINT32_MAX diff --git a/lib/libc/musl/arch/mipsn32/bits/termios.h b/lib/libc/musl/arch/mipsn32/bits/termios.h new file mode 100644 index 0000000000..9d571f78f6 --- /dev/null +++ b/lib/libc/musl/arch/mipsn32/bits/termios.h @@ -0,0 +1,169 @@ +struct termios { + tcflag_t c_iflag; + tcflag_t c_oflag; + tcflag_t c_cflag; + tcflag_t c_lflag; + cc_t c_line; + cc_t c_cc[NCCS]; + speed_t __c_ispeed; + speed_t __c_ospeed; +}; + +#define VINTR 0 +#define VQUIT 1 +#define VERASE 2 +#define VKILL 3 +#define VMIN 4 +#define VTIME 5 +#define VEOL2 6 +#define VSWTC 7 +#define VSWTCH 7 +#define VSTART 8 +#define VSTOP 9 +#define VSUSP 10 +#define VREPRINT 12 +#define VDISCARD 13 +#define VWERASE 14 +#define VLNEXT 15 +#define VEOF 16 +#define VEOL 17 + +#define IGNBRK 0000001 +#define BRKINT 0000002 +#define IGNPAR 0000004 +#define PARMRK 0000010 +#define INPCK 0000020 +#define ISTRIP 0000040 +#define INLCR 0000100 +#define IGNCR 0000200 +#define ICRNL 0000400 +#define IUCLC 0001000 +#define IXON 0002000 +#define IXANY 0004000 +#define IXOFF 0010000 +#define IMAXBEL 0020000 +#define IUTF8 0040000 + +#define OPOST 0000001 +#define OLCUC 0000002 +#define ONLCR 0000004 +#define OCRNL 0000010 +#define ONOCR 0000020 +#define ONLRET 0000040 +#define OFILL 0000100 +#define OFDEL 0000200 +#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) || defined(_XOPEN_SOURCE) +#define NLDLY 0000400 +#define NL0 0000000 +#define NL1 0000400 +#define CRDLY 0003000 +#define CR0 0000000 +#define CR1 0001000 +#define CR2 0002000 +#define CR3 0003000 +#define TABDLY 0014000 +#define TAB0 0000000 +#define TAB1 0004000 +#define TAB2 0010000 +#define TAB3 0014000 +#define BSDLY 0020000 +#define BS0 0000000 +#define BS1 0020000 +#define FFDLY 0100000 +#define FF0 0000000 +#define FF1 0100000 +#endif + +#define VTDLY 0040000 +#define VT0 0000000 +#define VT1 0040000 + +#define B0 0000000 +#define B50 0000001 +#define B75 0000002 +#define B110 0000003 +#define B134 0000004 +#define B150 0000005 +#define B200 0000006 +#define B300 0000007 +#define B600 0000010 +#define B1200 0000011 +#define B1800 0000012 +#define B2400 0000013 +#define B4800 0000014 +#define B9600 0000015 +#define B19200 0000016 +#define B38400 0000017 + +#define B57600 0010001 +#define B115200 0010002 +#define B230400 0010003 +#define B460800 0010004 +#define B500000 0010005 +#define B576000 0010006 +#define B921600 0010007 +#define B1000000 0010010 +#define B1152000 0010011 +#define B1500000 0010012 +#define B2000000 0010013 +#define B2500000 0010014 +#define B3000000 0010015 +#define B3500000 0010016 +#define B4000000 0010017 + +#define CSIZE 0000060 +#define CS5 0000000 +#define CS6 0000020 +#define CS7 0000040 +#define CS8 0000060 +#define CSTOPB 0000100 +#define CREAD 0000200 +#define PARENB 0000400 +#define PARODD 0001000 +#define HUPCL 0002000 +#define CLOCAL 0004000 + +#define ISIG 0000001 +#define ICANON 0000002 +#define ECHO 0000010 +#define ECHOE 0000020 +#define ECHOK 0000040 +#define ECHONL 0000100 +#define NOFLSH 0000200 +#define IEXTEN 0000400 +#define TOSTOP 0100000 +#define ITOSTOP 0100000 + +#define TCOOFF 0 +#define TCOON 1 +#define TCIOFF 2 +#define TCION 3 + +#define TCIFLUSH 0 +#define TCOFLUSH 1 +#define TCIOFLUSH 2 + +#define TCSANOW 0 +#define TCSADRAIN 1 +#define TCSAFLUSH 2 + +#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) +#define EXTA 0000016 +#define EXTB 0000017 +#define CBAUD 0010017 +#define CBAUDEX 0010000 +#define CIBAUD 002003600000 +#define CMSPAR 010000000000 +#define CRTSCTS 020000000000 + +#define XCASE 0000004 +#define ECHOCTL 0001000 +#define ECHOPRT 0002000 +#define ECHOKE 0004000 +#define FLUSHO 0020000 +#define PENDIN 0040000 +#define EXTPROC 0200000 + +#define XTABS 0014000 +#define TIOCSER_TEMT 1 +#endif diff --git a/lib/libc/musl/arch/mipsn32/bits/user.h b/lib/libc/musl/arch/mipsn32/bits/user.h new file mode 100644 index 0000000000..60fa1fda93 --- /dev/null +++ b/lib/libc/musl/arch/mipsn32/bits/user.h @@ -0,0 +1,15 @@ +struct user { + unsigned long regs[102]; + unsigned long u_tsize, u_dsize, u_ssize; + unsigned long long start_code, start_data, start_stack; + long long signal; + unsigned long long *u_ar0; + unsigned long long magic; + char u_comm[32]; +}; + +#define ELF_NGREG 45 +#define ELF_NFPREG 33 + +typedef unsigned long elf_greg_t, elf_gregset_t[ELF_NGREG]; +typedef double elf_fpreg_t, elf_fpregset_t[ELF_NFPREG]; diff --git a/lib/libc/musl/arch/mipsn32/crt_arch.h b/lib/libc/musl/arch/mipsn32/crt_arch.h new file mode 100644 index 0000000000..eb5928ccb2 --- /dev/null +++ b/lib/libc/musl/arch/mipsn32/crt_arch.h @@ -0,0 +1,32 @@ +__asm__( +".set push\n" +".set noreorder\n" +".text \n" +".global _" START "\n" +".global " START "\n" +".global " START "_data\n" +".type _" START ", @function\n" +".type " START ", @function\n" +".type " START "_data, @function\n" +"_" START ":\n" +"" START ":\n" +" bal 1f \n" +" move $fp, $0 \n" +"" START "_data: \n" +" .gpword " START "_data \n" +" .gpword " START "_c \n" +".weak _DYNAMIC \n" +".hidden _DYNAMIC \n" +" .gpword _DYNAMIC \n" +"1: lw $gp, 0($ra) \n" +" subu $gp, $ra, $gp \n" +" move $4, $sp \n" +" lw $5, 8($ra) \n" +" addu $5, $5, $gp \n" +" lw $25, 4($ra) \n" +" addu $25, $25, $gp \n" +" and $sp, $sp, -8 \n" +" jalr $25 \n" +" subu $sp, $sp, 16 \n" +".set pop \n" +); diff --git a/lib/libc/musl/arch/mipsn32/ksigaction.h b/lib/libc/musl/arch/mipsn32/ksigaction.h new file mode 100644 index 0000000000..485abf756d --- /dev/null +++ b/lib/libc/musl/arch/mipsn32/ksigaction.h @@ -0,0 +1,10 @@ +#include + +struct k_sigaction { + unsigned flags; + void (*handler)(int); + unsigned long mask[4]; + void *unused; +}; + +hidden void __restore(), __restore_rt(); diff --git a/lib/libc/musl/arch/mipsn32/kstat.h b/lib/libc/musl/arch/mipsn32/kstat.h new file mode 100644 index 0000000000..3841559c2c --- /dev/null +++ b/lib/libc/musl/arch/mipsn32/kstat.h @@ -0,0 +1,22 @@ +struct kstat { + unsigned st_dev; + long __pad1[3]; + ino_t st_ino; + mode_t st_mode; + nlink_t st_nlink; + uid_t st_uid; + gid_t st_gid; + unsigned st_rdev; + long __pad2[3]; + off_t st_size; + long st_atime_sec; + long st_atime_nsec; + long st_mtime_sec; + long st_mtime_nsec; + long st_ctime_sec; + long st_ctime_nsec; + blksize_t st_blksize; + long __pad3; + blkcnt_t st_blocks; + long __pad4[14]; +}; diff --git a/lib/libc/musl/arch/mipsn32/pthread_arch.h b/lib/libc/musl/arch/mipsn32/pthread_arch.h new file mode 100644 index 0000000000..c45347ab92 --- /dev/null +++ b/lib/libc/musl/arch/mipsn32/pthread_arch.h @@ -0,0 +1,19 @@ +static inline uintptr_t __get_tp() +{ +#if __mips_isa_rev < 2 + register uintptr_t tp __asm__("$3"); + __asm__ (".word 0x7c03e83b" : "=r" (tp) ); +#else + uintptr_t tp; + __asm__ ("rdhwr %0, $29" : "=r" (tp) ); +#endif + return tp; +} + +#define TLS_ABOVE_TP +#define GAP_ABOVE_TP 0 + +#define TP_OFFSET 0x7000 +#define DTP_OFFSET 0x8000 + +#define MC_PC pc diff --git a/lib/libc/musl/arch/mipsn32/reloc.h b/lib/libc/musl/arch/mipsn32/reloc.h new file mode 100644 index 0000000000..bf00bd6afc --- /dev/null +++ b/lib/libc/musl/arch/mipsn32/reloc.h @@ -0,0 +1,51 @@ +#if __mips_isa_rev >= 6 +#define ISA_SUFFIX "r6" +#else +#define ISA_SUFFIX "" +#endif + +#if __BYTE_ORDER == __LITTLE_ENDIAN +#define ENDIAN_SUFFIX "el" +#else +#define ENDIAN_SUFFIX "" +#endif + +#ifdef __mips_soft_float +#define FP_SUFFIX "-sf" +#else +#define FP_SUFFIX "" +#endif + +#define LDSO_ARCH "mipsn32" ISA_SUFFIX ENDIAN_SUFFIX FP_SUFFIX + +#define TPOFF_K (-0x7000) + +#define REL_SYM_OR_REL R_MIPS_REL32 +#define REL_PLT R_MIPS_JUMP_SLOT +#define REL_COPY R_MIPS_COPY +#define REL_DTPMOD R_MIPS_TLS_DTPMOD32 +#define REL_DTPOFF R_MIPS_TLS_DTPREL32 +#define REL_TPOFF R_MIPS_TLS_TPREL32 + +#define NEED_MIPS_GOT_RELOCS 1 +#define DT_DEBUG_INDIRECT DT_MIPS_RLD_MAP +#define DT_DEBUG_INDIRECT_REL DT_MIPS_RLD_MAP_REL +#define ARCH_SYM_REJECT_UND(s) (!((s)->st_other & STO_MIPS_PLT)) + +#define CRTJMP(pc,sp) __asm__ __volatile__( \ + "move $sp,%1 ; jr %0" : : "r"(pc), "r"(sp) : "memory" ) + +#define GETFUNCSYM(fp, sym, got) __asm__ ( \ + ".hidden " #sym "\n" \ + ".set push \n" \ + ".set noreorder \n" \ + " bal 1f \n" \ + " nop \n" \ + " .gpword . \n" \ + " .gpword " #sym " \n" \ + "1: lw %0, ($ra) \n" \ + " subu %0, $ra, %0 \n" \ + " lw $ra, 4($ra) \n" \ + " addu %0, %0, $ra \n" \ + ".set pop \n" \ + : "=r"(*(fp)) : : "memory", "ra" ) diff --git a/lib/libc/musl/arch/mipsn32/syscall_arch.h b/lib/libc/musl/arch/mipsn32/syscall_arch.h new file mode 100644 index 0000000000..c681905d0f --- /dev/null +++ b/lib/libc/musl/arch/mipsn32/syscall_arch.h @@ -0,0 +1,130 @@ +#define __SYSCALL_LL_E(x) (x) +#define __SYSCALL_LL_O(x) (x) + +#define SYSCALL_RLIM_INFINITY (-1UL/2) + +#if __mips_isa_rev >= 6 +#define SYSCALL_CLOBBERLIST \ + "$1", "$3", "$10", "$11", "$12", "$13", \ + "$14", "$15", "$24", "$25", "memory" +#else +#define SYSCALL_CLOBBERLIST \ + "$1", "$3", "$10", "$11", "$12", "$13", \ + "$14", "$15", "$24", "$25", "hi", "lo", "memory" +#endif + +static inline long __syscall0(long n) +{ + register long r7 __asm__("$7"); + register long r2 __asm__("$2"); + __asm__ __volatile__ ( + "daddu $2,$0,%2 ; syscall" + : "=&r"(r2), "=r"(r7) + : "ir"(n), "0"(r2) + : SYSCALL_CLOBBERLIST); + return r7 && r2>0 ? -r2 : r2; +} + +static inline long __syscall1(long n, long a) +{ + register long r4 __asm__("$4") = a; + register long r7 __asm__("$7"); + register long r2 __asm__("$2"); + __asm__ __volatile__ ( + "daddu $2,$0,%2 ; syscall" + : "=&r"(r2), "=r"(r7) + : "ir"(n), "0"(r2), "r"(r4) + : SYSCALL_CLOBBERLIST); + return r7 && r2>0 ? -r2 : r2; +} + +static inline long __syscall2(long n, long a, long b) +{ + register long r4 __asm__("$4") = a; + register long r5 __asm__("$5") = b; + register long r7 __asm__("$7"); + register long r2 __asm__("$2"); + + __asm__ __volatile__ ( + "daddu $2,$0,%2 ; syscall" + : "=&r"(r2), "=r"(r7) + : "ir"(n), "0"(r2), "r"(r4), "r"(r5) + : SYSCALL_CLOBBERLIST); + return r7 && r2>0 ? -r2 : r2; +} + +static inline long __syscall3(long n, long a, long b, long c) +{ + register long r4 __asm__("$4") = a; + register long r5 __asm__("$5") = b; + register long r6 __asm__("$6") = c; + register long r7 __asm__("$7"); + register long r2 __asm__("$2"); + + __asm__ __volatile__ ( + "daddu $2,$0,%2 ; syscall" + : "=&r"(r2), "=r"(r7) + : "ir"(n), "0"(r2), "r"(r4), "r"(r5), "r"(r6) + : SYSCALL_CLOBBERLIST); + return r7 && r2>0 ? -r2 : r2; +} + +static inline long __syscall4(long n, long a, long b, long c, long d) +{ + register long r4 __asm__("$4") = a; + register long r5 __asm__("$5") = b; + register long r6 __asm__("$6") = c; + register long r7 __asm__("$7") = d; + register long r2 __asm__("$2"); + + __asm__ __volatile__ ( + "daddu $2,$0,%2 ; syscall" + : "=&r"(r2), "+r"(r7) + : "ir"(n), "0"(r2), "r"(r4), "r"(r5), "r"(r6) + : SYSCALL_CLOBBERLIST); + return r7 && r2>0 ? -r2 : r2; +} + +static inline long __syscall5(long n, long a, long b, long c, long d, long e) +{ + register long r4 __asm__("$4") = a; + register long r5 __asm__("$5") = b; + register long r6 __asm__("$6") = c; + register long r7 __asm__("$7") = d; + register long r8 __asm__("$8") = e; + register long r2 __asm__("$2"); + + __asm__ __volatile__ ( + "daddu $2,$0,%2 ; syscall" + : "=&r"(r2), "+r"(r7) + : "ir"(n), "0"(r2), "r"(r4), "r"(r5), "r"(r6), "r"(r8) + : SYSCALL_CLOBBERLIST); + return r7 && r2>0 ? -r2 : r2; +} + +static inline long __syscall6(long n, long a, long b, long c, long d, long e, long f) +{ + register long r4 __asm__("$4") = a; + register long r5 __asm__("$5") = b; + register long r6 __asm__("$6") = c; + register long r7 __asm__("$7") = d; + register long r8 __asm__("$8") = e; + register long r9 __asm__("$9") = f; + register long r2 __asm__("$2"); + + __asm__ __volatile__ ( + "daddu $2,$0,%2 ; syscall" + : "=&r"(r2), "+r"(r7) + : "ir"(n), "0"(r2), "r"(r4), "r"(r5), "r"(r6), "r"(r8), "r"(r9) + : SYSCALL_CLOBBERLIST); + return r7 && r2>0 ? -r2 : r2; +} + +#define VDSO_USEFUL +#define VDSO_CGT32_SYM "__vdso_clock_gettime" +#define VDSO_CGT32_VER "LINUX_2.6" +#define VDSO_CGT_SYM "__vdso_clock_gettime64" +#define VDSO_CGT_VER "LINUX_2.6" + +#define SO_SNDTIMEO_OLD 0x1005 +#define SO_RCVTIMEO_OLD 0x1006 diff --git a/lib/libc/musl/arch/powerpc/bits/alltypes.h.in b/lib/libc/musl/arch/powerpc/bits/alltypes.h.in deleted file mode 100644 index b48df6a625..0000000000 --- a/lib/libc/musl/arch/powerpc/bits/alltypes.h.in +++ /dev/null @@ -1,20 +0,0 @@ -#define _REDIR_TIME64 1 -#define _Addr int -#define _Int64 long long -#define _Reg int - -#define __BYTE_ORDER 4321 -#define __LONG_MAX 0x7fffffffL - -#ifndef __cplusplus -#ifdef __WCHAR_TYPE__ -TYPEDEF __WCHAR_TYPE__ wchar_t; -#else -TYPEDEF long wchar_t; -#endif -#endif - -TYPEDEF float float_t; -TYPEDEF double double_t; - -TYPEDEF struct { long long __ll; long double __ld; } max_align_t; diff --git a/lib/libc/musl/arch/powerpc/bits/syscall.h.in b/lib/libc/musl/arch/powerpc/bits/syscall.h.in deleted file mode 100644 index ea95f3ed1e..0000000000 --- a/lib/libc/musl/arch/powerpc/bits/syscall.h.in +++ /dev/null @@ -1,433 +0,0 @@ -#define __NR_restart_syscall 0 -#define __NR_exit 1 -#define __NR_fork 2 -#define __NR_read 3 -#define __NR_write 4 -#define __NR_open 5 -#define __NR_close 6 -#define __NR_waitpid 7 -#define __NR_creat 8 -#define __NR_link 9 -#define __NR_unlink 10 -#define __NR_execve 11 -#define __NR_chdir 12 -#define __NR_time 13 -#define __NR_mknod 14 -#define __NR_chmod 15 -#define __NR_lchown 16 -#define __NR_break 17 -#define __NR_oldstat 18 -#define __NR_lseek 19 -#define __NR_getpid 20 -#define __NR_mount 21 -#define __NR_umount 22 -#define __NR_setuid 23 -#define __NR_getuid 24 -#define __NR_stime 25 -#define __NR_ptrace 26 -#define __NR_alarm 27 -#define __NR_oldfstat 28 -#define __NR_pause 29 -#define __NR_utime 30 -#define __NR_stty 31 -#define __NR_gtty 32 -#define __NR_access 33 -#define __NR_nice 34 -#define __NR_ftime 35 -#define __NR_sync 36 -#define __NR_kill 37 -#define __NR_rename 38 -#define __NR_mkdir 39 -#define __NR_rmdir 40 -#define __NR_dup 41 -#define __NR_pipe 42 -#define __NR_times 43 -#define __NR_prof 44 -#define __NR_brk 45 -#define __NR_setgid 46 -#define __NR_getgid 47 -#define __NR_signal 48 -#define __NR_geteuid 49 -#define __NR_getegid 50 -#define __NR_acct 51 -#define __NR_umount2 52 -#define __NR_lock 53 -#define __NR_ioctl 54 -#define __NR_fcntl 55 -#define __NR_mpx 56 -#define __NR_setpgid 57 -#define __NR_ulimit 58 -#define __NR_oldolduname 59 -#define __NR_umask 60 -#define __NR_chroot 61 -#define __NR_ustat 62 -#define __NR_dup2 63 -#define __NR_getppid 64 -#define __NR_getpgrp 65 -#define __NR_setsid 66 -#define __NR_sigaction 67 -#define __NR_sgetmask 68 -#define __NR_ssetmask 69 -#define __NR_setreuid 70 -#define __NR_setregid 71 -#define __NR_sigsuspend 72 -#define __NR_sigpending 73 -#define __NR_sethostname 74 -#define __NR_setrlimit 75 -#define __NR_getrlimit 76 -#define __NR_getrusage 77 -#define __NR_gettimeofday_time32 78 -#define __NR_settimeofday_time32 79 -#define __NR_getgroups 80 -#define __NR_setgroups 81 -#define __NR_select 82 -#define __NR_symlink 83 -#define __NR_oldlstat 84 -#define __NR_readlink 85 -#define __NR_uselib 86 -#define __NR_swapon 87 -#define __NR_reboot 88 -#define __NR_readdir 89 -#define __NR_mmap 90 -#define __NR_munmap 91 -#define __NR_truncate 92 -#define __NR_ftruncate 93 -#define __NR_fchmod 94 -#define __NR_fchown 95 -#define __NR_getpriority 96 -#define __NR_setpriority 97 -#define __NR_profil 98 -#define __NR_statfs 99 -#define __NR_fstatfs 100 -#define __NR_ioperm 101 -#define __NR_socketcall 102 -#define __NR_syslog 103 -#define __NR_setitimer 104 -#define __NR_getitimer 105 -#define __NR_stat 106 -#define __NR_lstat 107 -#define __NR_fstat 108 -#define __NR_olduname 109 -#define __NR_iopl 110 -#define __NR_vhangup 111 -#define __NR_idle 112 -#define __NR_vm86 113 -#define __NR_wait4 114 -#define __NR_swapoff 115 -#define __NR_sysinfo 116 -#define __NR_ipc 117 -#define __NR_fsync 118 -#define __NR_sigreturn 119 -#define __NR_clone 120 -#define __NR_setdomainname 121 -#define __NR_uname 122 -#define __NR_modify_ldt 123 -#define __NR_adjtimex 124 -#define __NR_mprotect 125 -#define __NR_sigprocmask 126 -#define __NR_create_module 127 -#define __NR_init_module 128 -#define __NR_delete_module 129 -#define __NR_get_kernel_syms 130 -#define __NR_quotactl 131 -#define __NR_getpgid 132 -#define __NR_fchdir 133 -#define __NR_bdflush 134 -#define __NR_sysfs 135 -#define __NR_personality 136 -#define __NR_afs_syscall 137 -#define __NR_setfsuid 138 -#define __NR_setfsgid 139 -#define __NR__llseek 140 -#define __NR_getdents 141 -#define __NR__newselect 142 -#define __NR_flock 143 -#define __NR_msync 144 -#define __NR_readv 145 -#define __NR_writev 146 -#define __NR_getsid 147 -#define __NR_fdatasync 148 -#define __NR__sysctl 149 -#define __NR_mlock 150 -#define __NR_munlock 151 -#define __NR_mlockall 152 -#define __NR_munlockall 153 -#define __NR_sched_setparam 154 -#define __NR_sched_getparam 155 -#define __NR_sched_setscheduler 156 -#define __NR_sched_getscheduler 157 -#define __NR_sched_yield 158 -#define __NR_sched_get_priority_max 159 -#define __NR_sched_get_priority_min 160 -#define __NR_sched_rr_get_interval 161 -#define __NR_nanosleep 162 -#define __NR_mremap 163 -#define __NR_setresuid 164 -#define __NR_getresuid 165 -#define __NR_query_module 166 -#define __NR_poll 167 -#define __NR_nfsservctl 168 -#define __NR_setresgid 169 -#define __NR_getresgid 170 -#define __NR_prctl 171 -#define __NR_rt_sigreturn 172 -#define __NR_rt_sigaction 173 -#define __NR_rt_sigprocmask 174 -#define __NR_rt_sigpending 175 -#define __NR_rt_sigtimedwait 176 -#define __NR_rt_sigqueueinfo 177 -#define __NR_rt_sigsuspend 178 -#define __NR_pread64 179 -#define __NR_pwrite64 180 -#define __NR_chown 181 -#define __NR_getcwd 182 -#define __NR_capget 183 -#define __NR_capset 184 -#define __NR_sigaltstack 185 -#define __NR_sendfile 186 -#define __NR_getpmsg 187 -#define __NR_putpmsg 188 -#define __NR_vfork 189 -#define __NR_ugetrlimit 190 -#define __NR_readahead 191 -#define __NR_mmap2 192 -#define __NR_truncate64 193 -#define __NR_ftruncate64 194 -#define __NR_stat64 195 -#define __NR_lstat64 196 -#define __NR_fstat64 197 -#define __NR_pciconfig_read 198 -#define __NR_pciconfig_write 199 -#define __NR_pciconfig_iobase 200 -#define __NR_multiplexer 201 -#define __NR_getdents64 202 -#define __NR_pivot_root 203 -#define __NR_fcntl64 204 -#define __NR_madvise 205 -#define __NR_mincore 206 -#define __NR_gettid 207 -#define __NR_tkill 208 -#define __NR_setxattr 209 -#define __NR_lsetxattr 210 -#define __NR_fsetxattr 211 -#define __NR_getxattr 212 -#define __NR_lgetxattr 213 -#define __NR_fgetxattr 214 -#define __NR_listxattr 215 -#define __NR_llistxattr 216 -#define __NR_flistxattr 217 -#define __NR_removexattr 218 -#define __NR_lremovexattr 219 -#define __NR_fremovexattr 220 -#define __NR_futex 221 -#define __NR_sched_setaffinity 222 -#define __NR_sched_getaffinity 223 -#define __NR_tuxcall 225 -#define __NR_sendfile64 226 -#define __NR_io_setup 227 -#define __NR_io_destroy 228 -#define __NR_io_getevents 229 -#define __NR_io_submit 230 -#define __NR_io_cancel 231 -#define __NR_set_tid_address 232 -#define __NR_fadvise64 233 -#define __NR_exit_group 234 -#define __NR_lookup_dcookie 235 -#define __NR_epoll_create 236 -#define __NR_epoll_ctl 237 -#define __NR_epoll_wait 238 -#define __NR_remap_file_pages 239 -#define __NR_timer_create 240 -#define __NR_timer_settime32 241 -#define __NR_timer_gettime32 242 -#define __NR_timer_getoverrun 243 -#define __NR_timer_delete 244 -#define __NR_clock_settime32 245 -#define __NR_clock_gettime32 246 -#define __NR_clock_getres_time32 247 -#define __NR_clock_nanosleep_time32 248 -#define __NR_swapcontext 249 -#define __NR_tgkill 250 -#define __NR_utimes 251 -#define __NR_statfs64 252 -#define __NR_fstatfs64 253 -#define __NR_fadvise64_64 254 -#define __NR_rtas 255 -#define __NR_sys_debug_setcontext 256 -#define __NR_migrate_pages 258 -#define __NR_mbind 259 -#define __NR_get_mempolicy 260 -#define __NR_set_mempolicy 261 -#define __NR_mq_open 262 -#define __NR_mq_unlink 263 -#define __NR_mq_timedsend 264 -#define __NR_mq_timedreceive 265 -#define __NR_mq_notify 266 -#define __NR_mq_getsetattr 267 -#define __NR_kexec_load 268 -#define __NR_add_key 269 -#define __NR_request_key 270 -#define __NR_keyctl 271 -#define __NR_waitid 272 -#define __NR_ioprio_set 273 -#define __NR_ioprio_get 274 -#define __NR_inotify_init 275 -#define __NR_inotify_add_watch 276 -#define __NR_inotify_rm_watch 277 -#define __NR_spu_run 278 -#define __NR_spu_create 279 -#define __NR_pselect6 280 -#define __NR_ppoll 281 -#define __NR_unshare 282 -#define __NR_splice 283 -#define __NR_tee 284 -#define __NR_vmsplice 285 -#define __NR_openat 286 -#define __NR_mkdirat 287 -#define __NR_mknodat 288 -#define __NR_fchownat 289 -#define __NR_futimesat 290 -#define __NR_fstatat64 291 -#define __NR_unlinkat 292 -#define __NR_renameat 293 -#define __NR_linkat 294 -#define __NR_symlinkat 295 -#define __NR_readlinkat 296 -#define __NR_fchmodat 297 -#define __NR_faccessat 298 -#define __NR_get_robust_list 299 -#define __NR_set_robust_list 300 -#define __NR_move_pages 301 -#define __NR_getcpu 302 -#define __NR_epoll_pwait 303 -#define __NR_utimensat 304 -#define __NR_signalfd 305 -#define __NR_timerfd_create 306 -#define __NR_eventfd 307 -#define __NR_sync_file_range2 308 -#define __NR_fallocate 309 -#define __NR_subpage_prot 310 -#define __NR_timerfd_settime32 311 -#define __NR_timerfd_gettime32 312 -#define __NR_signalfd4 313 -#define __NR_eventfd2 314 -#define __NR_epoll_create1 315 -#define __NR_dup3 316 -#define __NR_pipe2 317 -#define __NR_inotify_init1 318 -#define __NR_perf_event_open 319 -#define __NR_preadv 320 -#define __NR_pwritev 321 -#define __NR_rt_tgsigqueueinfo 322 -#define __NR_fanotify_init 323 -#define __NR_fanotify_mark 324 -#define __NR_prlimit64 325 -#define __NR_socket 326 -#define __NR_bind 327 -#define __NR_connect 328 -#define __NR_listen 329 -#define __NR_accept 330 -#define __NR_getsockname 331 -#define __NR_getpeername 332 -#define __NR_socketpair 333 -#define __NR_send 334 -#define __NR_sendto 335 -#define __NR_recv 336 -#define __NR_recvfrom 337 -#define __NR_shutdown 338 -#define __NR_setsockopt 339 -#define __NR_getsockopt 340 -#define __NR_sendmsg 341 -#define __NR_recvmsg 342 -#define __NR_recvmmsg 343 -#define __NR_accept4 344 -#define __NR_name_to_handle_at 345 -#define __NR_open_by_handle_at 346 -#define __NR_clock_adjtime 347 -#define __NR_syncfs 348 -#define __NR_sendmmsg 349 -#define __NR_setns 350 -#define __NR_process_vm_readv 351 -#define __NR_process_vm_writev 352 -#define __NR_finit_module 353 -#define __NR_kcmp 354 -#define __NR_sched_setattr 355 -#define __NR_sched_getattr 356 -#define __NR_renameat2 357 -#define __NR_seccomp 358 -#define __NR_getrandom 359 -#define __NR_memfd_create 360 -#define __NR_bpf 361 -#define __NR_execveat 362 -#define __NR_switch_endian 363 -#define __NR_userfaultfd 364 -#define __NR_membarrier 365 -#define __NR_mlock2 378 -#define __NR_copy_file_range 379 -#define __NR_preadv2 380 -#define __NR_pwritev2 381 -#define __NR_kexec_file_load 382 -#define __NR_statx 383 -#define __NR_pkey_alloc 384 -#define __NR_pkey_free 385 -#define __NR_pkey_mprotect 386 -#define __NR_rseq 387 -#define __NR_io_pgetevents 388 -#define __NR_semget 393 -#define __NR_semctl 394 -#define __NR_shmget 395 -#define __NR_shmctl 396 -#define __NR_shmat 397 -#define __NR_shmdt 398 -#define __NR_msgget 399 -#define __NR_msgsnd 400 -#define __NR_msgrcv 401 -#define __NR_msgctl 402 -#define __NR_clock_gettime64 403 -#define __NR_clock_settime64 404 -#define __NR_clock_adjtime64 405 -#define __NR_clock_getres_time64 406 -#define __NR_clock_nanosleep_time64 407 -#define __NR_timer_gettime64 408 -#define __NR_timer_settime64 409 -#define __NR_timerfd_gettime64 410 -#define __NR_timerfd_settime64 411 -#define __NR_utimensat_time64 412 -#define __NR_pselect6_time64 413 -#define __NR_ppoll_time64 414 -#define __NR_io_pgetevents_time64 416 -#define __NR_recvmmsg_time64 417 -#define __NR_mq_timedsend_time64 418 -#define __NR_mq_timedreceive_time64 419 -#define __NR_semtimedop_time64 420 -#define __NR_rt_sigtimedwait_time64 421 -#define __NR_futex_time64 422 -#define __NR_sched_rr_get_interval_time64 423 -#define __NR_pidfd_send_signal 424 -#define __NR_io_uring_setup 425 -#define __NR_io_uring_enter 426 -#define __NR_io_uring_register 427 -#define __NR_open_tree 428 -#define __NR_move_mount 429 -#define __NR_fsopen 430 -#define __NR_fsconfig 431 -#define __NR_fsmount 432 -#define __NR_fspick 433 -#define __NR_pidfd_open 434 -#define __NR_clone3 435 -#define __NR_close_range 436 -#define __NR_openat2 437 -#define __NR_pidfd_getfd 438 -#define __NR_faccessat2 439 -#define __NR_process_madvise 440 -#define __NR_epoll_pwait2 441 -#define __NR_mount_setattr 442 -#define __NR_landlock_create_ruleset 444 -#define __NR_landlock_add_rule 445 -#define __NR_landlock_restrict_self 446 -#define __NR_process_mrelease 448 -#define __NR_futex_waitv 449 -#define __NR_set_mempolicy_home_node 450 -#define __NR_cachestat 451 -#define __NR_fchmodat2 452 - diff --git a/lib/libc/musl/arch/powerpc64/bits/alltypes.h.in b/lib/libc/musl/arch/powerpc64/bits/alltypes.h.in deleted file mode 100644 index 143ffa8d25..0000000000 --- a/lib/libc/musl/arch/powerpc64/bits/alltypes.h.in +++ /dev/null @@ -1,20 +0,0 @@ -#define _Addr long -#define _Int64 long -#define _Reg long - -#if __BIG_ENDIAN__ -#define __BYTE_ORDER 4321 -#else -#define __BYTE_ORDER 1234 -#endif - -#define __LONG_MAX 0x7fffffffffffffffL - -#ifndef __cplusplus -TYPEDEF int wchar_t; -#endif - -TYPEDEF float float_t; -TYPEDEF double double_t; - -TYPEDEF struct { long long __ll; long double __ld; } max_align_t; diff --git a/lib/libc/musl/arch/powerpc64/bits/syscall.h.in b/lib/libc/musl/arch/powerpc64/bits/syscall.h.in deleted file mode 100644 index 435510796a..0000000000 --- a/lib/libc/musl/arch/powerpc64/bits/syscall.h.in +++ /dev/null @@ -1,405 +0,0 @@ -#define __NR_restart_syscall 0 -#define __NR_exit 1 -#define __NR_fork 2 -#define __NR_read 3 -#define __NR_write 4 -#define __NR_open 5 -#define __NR_close 6 -#define __NR_waitpid 7 -#define __NR_creat 8 -#define __NR_link 9 -#define __NR_unlink 10 -#define __NR_execve 11 -#define __NR_chdir 12 -#define __NR_time 13 -#define __NR_mknod 14 -#define __NR_chmod 15 -#define __NR_lchown 16 -#define __NR_break 17 -#define __NR_oldstat 18 -#define __NR_lseek 19 -#define __NR_getpid 20 -#define __NR_mount 21 -#define __NR_umount 22 -#define __NR_setuid 23 -#define __NR_getuid 24 -#define __NR_stime 25 -#define __NR_ptrace 26 -#define __NR_alarm 27 -#define __NR_oldfstat 28 -#define __NR_pause 29 -#define __NR_utime 30 -#define __NR_stty 31 -#define __NR_gtty 32 -#define __NR_access 33 -#define __NR_nice 34 -#define __NR_ftime 35 -#define __NR_sync 36 -#define __NR_kill 37 -#define __NR_rename 38 -#define __NR_mkdir 39 -#define __NR_rmdir 40 -#define __NR_dup 41 -#define __NR_pipe 42 -#define __NR_times 43 -#define __NR_prof 44 -#define __NR_brk 45 -#define __NR_setgid 46 -#define __NR_getgid 47 -#define __NR_signal 48 -#define __NR_geteuid 49 -#define __NR_getegid 50 -#define __NR_acct 51 -#define __NR_umount2 52 -#define __NR_lock 53 -#define __NR_ioctl 54 -#define __NR_fcntl 55 -#define __NR_mpx 56 -#define __NR_setpgid 57 -#define __NR_ulimit 58 -#define __NR_oldolduname 59 -#define __NR_umask 60 -#define __NR_chroot 61 -#define __NR_ustat 62 -#define __NR_dup2 63 -#define __NR_getppid 64 -#define __NR_getpgrp 65 -#define __NR_setsid 66 -#define __NR_sigaction 67 -#define __NR_sgetmask 68 -#define __NR_ssetmask 69 -#define __NR_setreuid 70 -#define __NR_setregid 71 -#define __NR_sigsuspend 72 -#define __NR_sigpending 73 -#define __NR_sethostname 74 -#define __NR_setrlimit 75 -#define __NR_getrlimit 76 -#define __NR_getrusage 77 -#define __NR_gettimeofday 78 -#define __NR_settimeofday 79 -#define __NR_getgroups 80 -#define __NR_setgroups 81 -#define __NR_select 82 -#define __NR_symlink 83 -#define __NR_oldlstat 84 -#define __NR_readlink 85 -#define __NR_uselib 86 -#define __NR_swapon 87 -#define __NR_reboot 88 -#define __NR_readdir 89 -#define __NR_mmap 90 -#define __NR_munmap 91 -#define __NR_truncate 92 -#define __NR_ftruncate 93 -#define __NR_fchmod 94 -#define __NR_fchown 95 -#define __NR_getpriority 96 -#define __NR_setpriority 97 -#define __NR_profil 98 -#define __NR_statfs 99 -#define __NR_fstatfs 100 -#define __NR_ioperm 101 -#define __NR_socketcall 102 -#define __NR_syslog 103 -#define __NR_setitimer 104 -#define __NR_getitimer 105 -#define __NR_stat 106 -#define __NR_lstat 107 -#define __NR_fstat 108 -#define __NR_olduname 109 -#define __NR_iopl 110 -#define __NR_vhangup 111 -#define __NR_idle 112 -#define __NR_vm86 113 -#define __NR_wait4 114 -#define __NR_swapoff 115 -#define __NR_sysinfo 116 -#define __NR_ipc 117 -#define __NR_fsync 118 -#define __NR_sigreturn 119 -#define __NR_clone 120 -#define __NR_setdomainname 121 -#define __NR_uname 122 -#define __NR_modify_ldt 123 -#define __NR_adjtimex 124 -#define __NR_mprotect 125 -#define __NR_sigprocmask 126 -#define __NR_create_module 127 -#define __NR_init_module 128 -#define __NR_delete_module 129 -#define __NR_get_kernel_syms 130 -#define __NR_quotactl 131 -#define __NR_getpgid 132 -#define __NR_fchdir 133 -#define __NR_bdflush 134 -#define __NR_sysfs 135 -#define __NR_personality 136 -#define __NR_afs_syscall 137 -#define __NR_setfsuid 138 -#define __NR_setfsgid 139 -#define __NR__llseek 140 -#define __NR_getdents 141 -#define __NR__newselect 142 -#define __NR_flock 143 -#define __NR_msync 144 -#define __NR_readv 145 -#define __NR_writev 146 -#define __NR_getsid 147 -#define __NR_fdatasync 148 -#define __NR__sysctl 149 -#define __NR_mlock 150 -#define __NR_munlock 151 -#define __NR_mlockall 152 -#define __NR_munlockall 153 -#define __NR_sched_setparam 154 -#define __NR_sched_getparam 155 -#define __NR_sched_setscheduler 156 -#define __NR_sched_getscheduler 157 -#define __NR_sched_yield 158 -#define __NR_sched_get_priority_max 159 -#define __NR_sched_get_priority_min 160 -#define __NR_sched_rr_get_interval 161 -#define __NR_nanosleep 162 -#define __NR_mremap 163 -#define __NR_setresuid 164 -#define __NR_getresuid 165 -#define __NR_query_module 166 -#define __NR_poll 167 -#define __NR_nfsservctl 168 -#define __NR_setresgid 169 -#define __NR_getresgid 170 -#define __NR_prctl 171 -#define __NR_rt_sigreturn 172 -#define __NR_rt_sigaction 173 -#define __NR_rt_sigprocmask 174 -#define __NR_rt_sigpending 175 -#define __NR_rt_sigtimedwait 176 -#define __NR_rt_sigqueueinfo 177 -#define __NR_rt_sigsuspend 178 -#define __NR_pread64 179 -#define __NR_pwrite64 180 -#define __NR_chown 181 -#define __NR_getcwd 182 -#define __NR_capget 183 -#define __NR_capset 184 -#define __NR_sigaltstack 185 -#define __NR_sendfile 186 -#define __NR_getpmsg 187 -#define __NR_putpmsg 188 -#define __NR_vfork 189 -#define __NR_ugetrlimit 190 -#define __NR_readahead 191 -#define __NR_pciconfig_read 198 -#define __NR_pciconfig_write 199 -#define __NR_pciconfig_iobase 200 -#define __NR_multiplexer 201 -#define __NR_getdents64 202 -#define __NR_pivot_root 203 -#define __NR_madvise 205 -#define __NR_mincore 206 -#define __NR_gettid 207 -#define __NR_tkill 208 -#define __NR_setxattr 209 -#define __NR_lsetxattr 210 -#define __NR_fsetxattr 211 -#define __NR_getxattr 212 -#define __NR_lgetxattr 213 -#define __NR_fgetxattr 214 -#define __NR_listxattr 215 -#define __NR_llistxattr 216 -#define __NR_flistxattr 217 -#define __NR_removexattr 218 -#define __NR_lremovexattr 219 -#define __NR_fremovexattr 220 -#define __NR_futex 221 -#define __NR_sched_setaffinity 222 -#define __NR_sched_getaffinity 223 -#define __NR_tuxcall 225 -#define __NR_io_setup 227 -#define __NR_io_destroy 228 -#define __NR_io_getevents 229 -#define __NR_io_submit 230 -#define __NR_io_cancel 231 -#define __NR_set_tid_address 232 -#define __NR_fadvise64 233 -#define __NR_exit_group 234 -#define __NR_lookup_dcookie 235 -#define __NR_epoll_create 236 -#define __NR_epoll_ctl 237 -#define __NR_epoll_wait 238 -#define __NR_remap_file_pages 239 -#define __NR_timer_create 240 -#define __NR_timer_settime 241 -#define __NR_timer_gettime 242 -#define __NR_timer_getoverrun 243 -#define __NR_timer_delete 244 -#define __NR_clock_settime 245 -#define __NR_clock_gettime 246 -#define __NR_clock_getres 247 -#define __NR_clock_nanosleep 248 -#define __NR_swapcontext 249 -#define __NR_tgkill 250 -#define __NR_utimes 251 -#define __NR_statfs64 252 -#define __NR_fstatfs64 253 -#define __NR_rtas 255 -#define __NR_sys_debug_setcontext 256 -#define __NR_migrate_pages 258 -#define __NR_mbind 259 -#define __NR_get_mempolicy 260 -#define __NR_set_mempolicy 261 -#define __NR_mq_open 262 -#define __NR_mq_unlink 263 -#define __NR_mq_timedsend 264 -#define __NR_mq_timedreceive 265 -#define __NR_mq_notify 266 -#define __NR_mq_getsetattr 267 -#define __NR_kexec_load 268 -#define __NR_add_key 269 -#define __NR_request_key 270 -#define __NR_keyctl 271 -#define __NR_waitid 272 -#define __NR_ioprio_set 273 -#define __NR_ioprio_get 274 -#define __NR_inotify_init 275 -#define __NR_inotify_add_watch 276 -#define __NR_inotify_rm_watch 277 -#define __NR_spu_run 278 -#define __NR_spu_create 279 -#define __NR_pselect6 280 -#define __NR_ppoll 281 -#define __NR_unshare 282 -#define __NR_splice 283 -#define __NR_tee 284 -#define __NR_vmsplice 285 -#define __NR_openat 286 -#define __NR_mkdirat 287 -#define __NR_mknodat 288 -#define __NR_fchownat 289 -#define __NR_futimesat 290 -#define __NR_newfstatat 291 -#define __NR_unlinkat 292 -#define __NR_renameat 293 -#define __NR_linkat 294 -#define __NR_symlinkat 295 -#define __NR_readlinkat 296 -#define __NR_fchmodat 297 -#define __NR_faccessat 298 -#define __NR_get_robust_list 299 -#define __NR_set_robust_list 300 -#define __NR_move_pages 301 -#define __NR_getcpu 302 -#define __NR_epoll_pwait 303 -#define __NR_utimensat 304 -#define __NR_signalfd 305 -#define __NR_timerfd_create 306 -#define __NR_eventfd 307 -#define __NR_sync_file_range2 308 -#define __NR_fallocate 309 -#define __NR_subpage_prot 310 -#define __NR_timerfd_settime 311 -#define __NR_timerfd_gettime 312 -#define __NR_signalfd4 313 -#define __NR_eventfd2 314 -#define __NR_epoll_create1 315 -#define __NR_dup3 316 -#define __NR_pipe2 317 -#define __NR_inotify_init1 318 -#define __NR_perf_event_open 319 -#define __NR_preadv 320 -#define __NR_pwritev 321 -#define __NR_rt_tgsigqueueinfo 322 -#define __NR_fanotify_init 323 -#define __NR_fanotify_mark 324 -#define __NR_prlimit64 325 -#define __NR_socket 326 -#define __NR_bind 327 -#define __NR_connect 328 -#define __NR_listen 329 -#define __NR_accept 330 -#define __NR_getsockname 331 -#define __NR_getpeername 332 -#define __NR_socketpair 333 -#define __NR_send 334 -#define __NR_sendto 335 -#define __NR_recv 336 -#define __NR_recvfrom 337 -#define __NR_shutdown 338 -#define __NR_setsockopt 339 -#define __NR_getsockopt 340 -#define __NR_sendmsg 341 -#define __NR_recvmsg 342 -#define __NR_recvmmsg 343 -#define __NR_accept4 344 -#define __NR_name_to_handle_at 345 -#define __NR_open_by_handle_at 346 -#define __NR_clock_adjtime 347 -#define __NR_syncfs 348 -#define __NR_sendmmsg 349 -#define __NR_setns 350 -#define __NR_process_vm_readv 351 -#define __NR_process_vm_writev 352 -#define __NR_finit_module 353 -#define __NR_kcmp 354 -#define __NR_sched_setattr 355 -#define __NR_sched_getattr 356 -#define __NR_renameat2 357 -#define __NR_seccomp 358 -#define __NR_getrandom 359 -#define __NR_memfd_create 360 -#define __NR_bpf 361 -#define __NR_execveat 362 -#define __NR_switch_endian 363 -#define __NR_userfaultfd 364 -#define __NR_membarrier 365 -#define __NR_mlock2 378 -#define __NR_copy_file_range 379 -#define __NR_preadv2 380 -#define __NR_pwritev2 381 -#define __NR_kexec_file_load 382 -#define __NR_statx 383 -#define __NR_pkey_alloc 384 -#define __NR_pkey_free 385 -#define __NR_pkey_mprotect 386 -#define __NR_rseq 387 -#define __NR_io_pgetevents 388 -#define __NR_semtimedop 392 -#define __NR_semget 393 -#define __NR_semctl 394 -#define __NR_shmget 395 -#define __NR_shmctl 396 -#define __NR_shmat 397 -#define __NR_shmdt 398 -#define __NR_msgget 399 -#define __NR_msgsnd 400 -#define __NR_msgrcv 401 -#define __NR_msgctl 402 -#define __NR_pidfd_send_signal 424 -#define __NR_io_uring_setup 425 -#define __NR_io_uring_enter 426 -#define __NR_io_uring_register 427 -#define __NR_open_tree 428 -#define __NR_move_mount 429 -#define __NR_fsopen 430 -#define __NR_fsconfig 431 -#define __NR_fsmount 432 -#define __NR_fspick 433 -#define __NR_pidfd_open 434 -#define __NR_clone3 435 -#define __NR_close_range 436 -#define __NR_openat2 437 -#define __NR_pidfd_getfd 438 -#define __NR_faccessat2 439 -#define __NR_process_madvise 440 -#define __NR_epoll_pwait2 441 -#define __NR_mount_setattr 442 -#define __NR_landlock_create_ruleset 444 -#define __NR_landlock_add_rule 445 -#define __NR_landlock_restrict_self 446 -#define __NR_process_mrelease 448 -#define __NR_futex_waitv 449 -#define __NR_set_mempolicy_home_node 450 -#define __NR_cachestat 451 -#define __NR_fchmodat2 452 - diff --git a/lib/libc/musl/arch/riscv32/bits/alltypes.h.in b/lib/libc/musl/arch/riscv32/bits/alltypes.h.in deleted file mode 100644 index e2b6129e46..0000000000 --- a/lib/libc/musl/arch/riscv32/bits/alltypes.h.in +++ /dev/null @@ -1,18 +0,0 @@ -#define _Addr int -#define _Int64 long long -#define _Reg int - -#define __BYTE_ORDER 1234 -#define __LONG_MAX 0x7fffffffL - -#ifndef __cplusplus -TYPEDEF int wchar_t; -#endif - -TYPEDEF int blksize_t; -TYPEDEF unsigned int nlink_t; - -TYPEDEF float float_t; -TYPEDEF double double_t; - -TYPEDEF struct { long long __ll; long double __ld; } max_align_t; diff --git a/lib/libc/musl/arch/riscv32/bits/syscall.h.in b/lib/libc/musl/arch/riscv32/bits/syscall.h.in deleted file mode 100644 index 9228d84089..0000000000 --- a/lib/libc/musl/arch/riscv32/bits/syscall.h.in +++ /dev/null @@ -1,300 +0,0 @@ -#define __NR_io_setup 0 -#define __NR_io_destroy 1 -#define __NR_io_submit 2 -#define __NR_io_cancel 3 -#define __NR_setxattr 5 -#define __NR_lsetxattr 6 -#define __NR_fsetxattr 7 -#define __NR_getxattr 8 -#define __NR_lgetxattr 9 -#define __NR_fgetxattr 10 -#define __NR_listxattr 11 -#define __NR_llistxattr 12 -#define __NR_flistxattr 13 -#define __NR_removexattr 14 -#define __NR_lremovexattr 15 -#define __NR_fremovexattr 16 -#define __NR_getcwd 17 -#define __NR_lookup_dcookie 18 -#define __NR_eventfd2 19 -#define __NR_epoll_create1 20 -#define __NR_epoll_ctl 21 -#define __NR_epoll_pwait 22 -#define __NR_dup 23 -#define __NR_dup3 24 -#define __NR_fcntl64 25 -#define __NR_inotify_init1 26 -#define __NR_inotify_add_watch 27 -#define __NR_inotify_rm_watch 28 -#define __NR_ioctl 29 -#define __NR_ioprio_set 30 -#define __NR_ioprio_get 31 -#define __NR_flock 32 -#define __NR_mknodat 33 -#define __NR_mkdirat 34 -#define __NR_unlinkat 35 -#define __NR_symlinkat 36 -#define __NR_linkat 37 -#define __NR_umount2 39 -#define __NR_mount 40 -#define __NR_pivot_root 41 -#define __NR_nfsservctl 42 -#define __NR_statfs64 43 -#define __NR_fstatfs64 44 -#define __NR_truncate64 45 -#define __NR_ftruncate64 46 -#define __NR_fallocate 47 -#define __NR_faccessat 48 -#define __NR_chdir 49 -#define __NR_fchdir 50 -#define __NR_chroot 51 -#define __NR_fchmod 52 -#define __NR_fchmodat 53 -#define __NR_fchownat 54 -#define __NR_fchown 55 -#define __NR_openat 56 -#define __NR_close 57 -#define __NR_vhangup 58 -#define __NR_pipe2 59 -#define __NR_quotactl 60 -#define __NR_getdents64 61 -#define __NR__llseek 62 -#define __NR_read 63 -#define __NR_write 64 -#define __NR_readv 65 -#define __NR_writev 66 -#define __NR_pread64 67 -#define __NR_pwrite64 68 -#define __NR_preadv 69 -#define __NR_pwritev 70 -#define __NR_sendfile64 71 -#define __NR_signalfd4 74 -#define __NR_vmsplice 75 -#define __NR_splice 76 -#define __NR_tee 77 -#define __NR_readlinkat 78 -#define __NR_sync 81 -#define __NR_fsync 82 -#define __NR_fdatasync 83 -#define __NR_sync_file_range 84 -#define __NR_timerfd_create 85 -#define __NR_acct 89 -#define __NR_capget 90 -#define __NR_capset 91 -#define __NR_personality 92 -#define __NR_exit 93 -#define __NR_exit_group 94 -#define __NR_waitid 95 -#define __NR_set_tid_address 96 -#define __NR_unshare 97 -#define __NR_set_robust_list 99 -#define __NR_get_robust_list 100 -#define __NR_nanosleep 101 -#define __NR_getitimer 102 -#define __NR_setitimer 103 -#define __NR_kexec_load 104 -#define __NR_init_module 105 -#define __NR_delete_module 106 -#define __NR_timer_create 107 -#define __NR_timer_getoverrun 109 -#define __NR_timer_delete 111 -#define __NR_syslog 116 -#define __NR_ptrace 117 -#define __NR_sched_setparam 118 -#define __NR_sched_setscheduler 119 -#define __NR_sched_getscheduler 120 -#define __NR_sched_getparam 121 -#define __NR_sched_setaffinity 122 -#define __NR_sched_getaffinity 123 -#define __NR_sched_yield 124 -#define __NR_sched_get_priority_max 125 -#define __NR_sched_get_priority_min 126 -#define __NR_restart_syscall 128 -#define __NR_kill 129 -#define __NR_tkill 130 -#define __NR_tgkill 131 -#define __NR_sigaltstack 132 -#define __NR_rt_sigsuspend 133 -#define __NR_rt_sigaction 134 -#define __NR_rt_sigprocmask 135 -#define __NR_rt_sigpending 136 -#define __NR_rt_sigqueueinfo 138 -#define __NR_rt_sigreturn 139 -#define __NR_setpriority 140 -#define __NR_getpriority 141 -#define __NR_reboot 142 -#define __NR_setregid 143 -#define __NR_setgid 144 -#define __NR_setreuid 145 -#define __NR_setuid 146 -#define __NR_setresuid 147 -#define __NR_getresuid 148 -#define __NR_setresgid 149 -#define __NR_getresgid 150 -#define __NR_setfsuid 151 -#define __NR_setfsgid 152 -#define __NR_times 153 -#define __NR_setpgid 154 -#define __NR_getpgid 155 -#define __NR_getsid 156 -#define __NR_setsid 157 -#define __NR_getgroups 158 -#define __NR_setgroups 159 -#define __NR_uname 160 -#define __NR_sethostname 161 -#define __NR_setdomainname 162 -#define __NR_getrusage 165 -#define __NR_umask 166 -#define __NR_prctl 167 -#define __NR_getcpu 168 -#define __NR_getpid 172 -#define __NR_getppid 173 -#define __NR_getuid 174 -#define __NR_geteuid 175 -#define __NR_getgid 176 -#define __NR_getegid 177 -#define __NR_gettid 178 -#define __NR_sysinfo 179 -#define __NR_mq_open 180 -#define __NR_mq_unlink 181 -#define __NR_mq_notify 184 -#define __NR_mq_getsetattr 185 -#define __NR_msgget 186 -#define __NR_msgctl 187 -#define __NR_msgrcv 188 -#define __NR_msgsnd 189 -#define __NR_semget 190 -#define __NR_semctl 191 -#define __NR_semop 193 -#define __NR_shmget 194 -#define __NR_shmctl 195 -#define __NR_shmat 196 -#define __NR_shmdt 197 -#define __NR_socket 198 -#define __NR_socketpair 199 -#define __NR_bind 200 -#define __NR_listen 201 -#define __NR_accept 202 -#define __NR_connect 203 -#define __NR_getsockname 204 -#define __NR_getpeername 205 -#define __NR_sendto 206 -#define __NR_recvfrom 207 -#define __NR_setsockopt 208 -#define __NR_getsockopt 209 -#define __NR_shutdown 210 -#define __NR_sendmsg 211 -#define __NR_recvmsg 212 -#define __NR_readahead 213 -#define __NR_brk 214 -#define __NR_munmap 215 -#define __NR_mremap 216 -#define __NR_add_key 217 -#define __NR_request_key 218 -#define __NR_keyctl 219 -#define __NR_clone 220 -#define __NR_execve 221 -#define __NR_mmap2 222 -#define __NR_fadvise64_64 223 -#define __NR_swapon 224 -#define __NR_swapoff 225 -#define __NR_mprotect 226 -#define __NR_msync 227 -#define __NR_mlock 228 -#define __NR_munlock 229 -#define __NR_mlockall 230 -#define __NR_munlockall 231 -#define __NR_mincore 232 -#define __NR_madvise 233 -#define __NR_remap_file_pages 234 -#define __NR_mbind 235 -#define __NR_get_mempolicy 236 -#define __NR_set_mempolicy 237 -#define __NR_migrate_pages 238 -#define __NR_move_pages 239 -#define __NR_rt_tgsigqueueinfo 240 -#define __NR_perf_event_open 241 -#define __NR_accept4 242 -#define __NR_arch_specific_syscall 244 -#define __NR_prlimit64 261 -#define __NR_fanotify_init 262 -#define __NR_fanotify_mark 263 -#define __NR_name_to_handle_at 264 -#define __NR_open_by_handle_at 265 -#define __NR_syncfs 267 -#define __NR_setns 268 -#define __NR_sendmmsg 269 -#define __NR_process_vm_readv 270 -#define __NR_process_vm_writev 271 -#define __NR_kcmp 272 -#define __NR_finit_module 273 -#define __NR_sched_setattr 274 -#define __NR_sched_getattr 275 -#define __NR_renameat2 276 -#define __NR_seccomp 277 -#define __NR_getrandom 278 -#define __NR_memfd_create 279 -#define __NR_bpf 280 -#define __NR_execveat 281 -#define __NR_userfaultfd 282 -#define __NR_membarrier 283 -#define __NR_mlock2 284 -#define __NR_copy_file_range 285 -#define __NR_preadv2 286 -#define __NR_pwritev2 287 -#define __NR_pkey_mprotect 288 -#define __NR_pkey_alloc 289 -#define __NR_pkey_free 290 -#define __NR_statx 291 -#define __NR_rseq 293 -#define __NR_kexec_file_load 294 -#define __NR_clock_gettime64 403 -#define __NR_clock_settime64 404 -#define __NR_clock_adjtime64 405 -#define __NR_clock_getres_time64 406 -#define __NR_clock_nanosleep_time64 407 -#define __NR_timer_gettime64 408 -#define __NR_timer_settime64 409 -#define __NR_timerfd_gettime64 410 -#define __NR_timerfd_settime64 411 -#define __NR_utimensat_time64 412 -#define __NR_pselect6_time64 413 -#define __NR_ppoll_time64 414 -#define __NR_io_pgetevents_time64 416 -#define __NR_recvmmsg_time64 417 -#define __NR_mq_timedsend_time64 418 -#define __NR_mq_timedreceive_time64 419 -#define __NR_semtimedop_time64 420 -#define __NR_rt_sigtimedwait_time64 421 -#define __NR_futex_time64 422 -#define __NR_sched_rr_get_interval_time64 423 -#define __NR_pidfd_send_signal 424 -#define __NR_io_uring_setup 425 -#define __NR_io_uring_enter 426 -#define __NR_io_uring_register 427 -#define __NR_open_tree 428 -#define __NR_move_mount 429 -#define __NR_fsopen 430 -#define __NR_fsconfig 431 -#define __NR_fsmount 432 -#define __NR_fspick 433 -#define __NR_pidfd_open 434 -#define __NR_clone3 435 -#define __NR_openat2 437 -#define __NR_pidfd_getfd 438 -#define __NR_faccessat2 439 -#define __NR_process_madvise 440 -#define __NR_epoll_pwait2 441 -#define __NR_mount_setattr 442 -#define __NR_landlock_create_ruleset 444 -#define __NR_landlock_add_rule 445 -#define __NR_landlock_restrict_self 446 -#define __NR_process_mrelease 448 -#define __NR_futex_waitv 449 -#define __NR_set_mempolicy_home_node 450 -#define __NR_cachestat 451 -#define __NR_fchmodat2 452 -#define __NR_futex __NR_futex_time64 - -#define __NR_sysriscv __NR_arch_specific_syscall -#define __NR_riscv_flush_icache (__NR_sysriscv + 15) diff --git a/lib/libc/musl/arch/riscv64/bits/alltypes.h.in b/lib/libc/musl/arch/riscv64/bits/alltypes.h.in deleted file mode 100644 index 4579d1740b..0000000000 --- a/lib/libc/musl/arch/riscv64/bits/alltypes.h.in +++ /dev/null @@ -1,18 +0,0 @@ -#define _Addr long -#define _Int64 long -#define _Reg long - -#define __BYTE_ORDER 1234 -#define __LONG_MAX 0x7fffffffffffffffL - -#ifndef __cplusplus -TYPEDEF int wchar_t; -#endif - -TYPEDEF int blksize_t; -TYPEDEF unsigned int nlink_t; - -TYPEDEF float float_t; -TYPEDEF double double_t; - -TYPEDEF struct { long long __ll; long double __ld; } max_align_t; diff --git a/lib/libc/musl/arch/riscv64/bits/syscall.h.in b/lib/libc/musl/arch/riscv64/bits/syscall.h.in deleted file mode 100644 index e362bd0ec5..0000000000 --- a/lib/libc/musl/arch/riscv64/bits/syscall.h.in +++ /dev/null @@ -1,309 +0,0 @@ -#define __NR_io_setup 0 -#define __NR_io_destroy 1 -#define __NR_io_submit 2 -#define __NR_io_cancel 3 -#define __NR_io_getevents 4 -#define __NR_setxattr 5 -#define __NR_lsetxattr 6 -#define __NR_fsetxattr 7 -#define __NR_getxattr 8 -#define __NR_lgetxattr 9 -#define __NR_fgetxattr 10 -#define __NR_listxattr 11 -#define __NR_llistxattr 12 -#define __NR_flistxattr 13 -#define __NR_removexattr 14 -#define __NR_lremovexattr 15 -#define __NR_fremovexattr 16 -#define __NR_getcwd 17 -#define __NR_lookup_dcookie 18 -#define __NR_eventfd2 19 -#define __NR_epoll_create1 20 -#define __NR_epoll_ctl 21 -#define __NR_epoll_pwait 22 -#define __NR_dup 23 -#define __NR_dup3 24 -#define __NR_fcntl 25 -#define __NR_inotify_init1 26 -#define __NR_inotify_add_watch 27 -#define __NR_inotify_rm_watch 28 -#define __NR_ioctl 29 -#define __NR_ioprio_set 30 -#define __NR_ioprio_get 31 -#define __NR_flock 32 -#define __NR_mknodat 33 -#define __NR_mkdirat 34 -#define __NR_unlinkat 35 -#define __NR_symlinkat 36 -#define __NR_linkat 37 -#define __NR_umount2 39 -#define __NR_mount 40 -#define __NR_pivot_root 41 -#define __NR_nfsservctl 42 -#define __NR_statfs 43 -#define __NR_fstatfs 44 -#define __NR_truncate 45 -#define __NR_ftruncate 46 -#define __NR_fallocate 47 -#define __NR_faccessat 48 -#define __NR_chdir 49 -#define __NR_fchdir 50 -#define __NR_chroot 51 -#define __NR_fchmod 52 -#define __NR_fchmodat 53 -#define __NR_fchownat 54 -#define __NR_fchown 55 -#define __NR_openat 56 -#define __NR_close 57 -#define __NR_vhangup 58 -#define __NR_pipe2 59 -#define __NR_quotactl 60 -#define __NR_getdents64 61 -#define __NR_lseek 62 -#define __NR_read 63 -#define __NR_write 64 -#define __NR_readv 65 -#define __NR_writev 66 -#define __NR_pread64 67 -#define __NR_pwrite64 68 -#define __NR_preadv 69 -#define __NR_pwritev 70 -#define __NR_sendfile 71 -#define __NR_pselect6 72 -#define __NR_ppoll 73 -#define __NR_signalfd4 74 -#define __NR_vmsplice 75 -#define __NR_splice 76 -#define __NR_tee 77 -#define __NR_readlinkat 78 -#define __NR_newfstatat 79 -#define __NR_fstat 80 -#define __NR_sync 81 -#define __NR_fsync 82 -#define __NR_fdatasync 83 -#define __NR_sync_file_range 84 -#define __NR_timerfd_create 85 -#define __NR_timerfd_settime 86 -#define __NR_timerfd_gettime 87 -#define __NR_utimensat 88 -#define __NR_acct 89 -#define __NR_capget 90 -#define __NR_capset 91 -#define __NR_personality 92 -#define __NR_exit 93 -#define __NR_exit_group 94 -#define __NR_waitid 95 -#define __NR_set_tid_address 96 -#define __NR_unshare 97 -#define __NR_futex 98 -#define __NR_set_robust_list 99 -#define __NR_get_robust_list 100 -#define __NR_nanosleep 101 -#define __NR_getitimer 102 -#define __NR_setitimer 103 -#define __NR_kexec_load 104 -#define __NR_init_module 105 -#define __NR_delete_module 106 -#define __NR_timer_create 107 -#define __NR_timer_gettime 108 -#define __NR_timer_getoverrun 109 -#define __NR_timer_settime 110 -#define __NR_timer_delete 111 -#define __NR_clock_settime 112 -#define __NR_clock_gettime 113 -#define __NR_clock_getres 114 -#define __NR_clock_nanosleep 115 -#define __NR_syslog 116 -#define __NR_ptrace 117 -#define __NR_sched_setparam 118 -#define __NR_sched_setscheduler 119 -#define __NR_sched_getscheduler 120 -#define __NR_sched_getparam 121 -#define __NR_sched_setaffinity 122 -#define __NR_sched_getaffinity 123 -#define __NR_sched_yield 124 -#define __NR_sched_get_priority_max 125 -#define __NR_sched_get_priority_min 126 -#define __NR_sched_rr_get_interval 127 -#define __NR_restart_syscall 128 -#define __NR_kill 129 -#define __NR_tkill 130 -#define __NR_tgkill 131 -#define __NR_sigaltstack 132 -#define __NR_rt_sigsuspend 133 -#define __NR_rt_sigaction 134 -#define __NR_rt_sigprocmask 135 -#define __NR_rt_sigpending 136 -#define __NR_rt_sigtimedwait 137 -#define __NR_rt_sigqueueinfo 138 -#define __NR_rt_sigreturn 139 -#define __NR_setpriority 140 -#define __NR_getpriority 141 -#define __NR_reboot 142 -#define __NR_setregid 143 -#define __NR_setgid 144 -#define __NR_setreuid 145 -#define __NR_setuid 146 -#define __NR_setresuid 147 -#define __NR_getresuid 148 -#define __NR_setresgid 149 -#define __NR_getresgid 150 -#define __NR_setfsuid 151 -#define __NR_setfsgid 152 -#define __NR_times 153 -#define __NR_setpgid 154 -#define __NR_getpgid 155 -#define __NR_getsid 156 -#define __NR_setsid 157 -#define __NR_getgroups 158 -#define __NR_setgroups 159 -#define __NR_uname 160 -#define __NR_sethostname 161 -#define __NR_setdomainname 162 -#define __NR_getrlimit 163 -#define __NR_setrlimit 164 -#define __NR_getrusage 165 -#define __NR_umask 166 -#define __NR_prctl 167 -#define __NR_getcpu 168 -#define __NR_gettimeofday 169 -#define __NR_settimeofday 170 -#define __NR_adjtimex 171 -#define __NR_getpid 172 -#define __NR_getppid 173 -#define __NR_getuid 174 -#define __NR_geteuid 175 -#define __NR_getgid 176 -#define __NR_getegid 177 -#define __NR_gettid 178 -#define __NR_sysinfo 179 -#define __NR_mq_open 180 -#define __NR_mq_unlink 181 -#define __NR_mq_timedsend 182 -#define __NR_mq_timedreceive 183 -#define __NR_mq_notify 184 -#define __NR_mq_getsetattr 185 -#define __NR_msgget 186 -#define __NR_msgctl 187 -#define __NR_msgrcv 188 -#define __NR_msgsnd 189 -#define __NR_semget 190 -#define __NR_semctl 191 -#define __NR_semtimedop 192 -#define __NR_semop 193 -#define __NR_shmget 194 -#define __NR_shmctl 195 -#define __NR_shmat 196 -#define __NR_shmdt 197 -#define __NR_socket 198 -#define __NR_socketpair 199 -#define __NR_bind 200 -#define __NR_listen 201 -#define __NR_accept 202 -#define __NR_connect 203 -#define __NR_getsockname 204 -#define __NR_getpeername 205 -#define __NR_sendto 206 -#define __NR_recvfrom 207 -#define __NR_setsockopt 208 -#define __NR_getsockopt 209 -#define __NR_shutdown 210 -#define __NR_sendmsg 211 -#define __NR_recvmsg 212 -#define __NR_readahead 213 -#define __NR_brk 214 -#define __NR_munmap 215 -#define __NR_mremap 216 -#define __NR_add_key 217 -#define __NR_request_key 218 -#define __NR_keyctl 219 -#define __NR_clone 220 -#define __NR_execve 221 -#define __NR_mmap 222 -#define __NR_fadvise64 223 -#define __NR_swapon 224 -#define __NR_swapoff 225 -#define __NR_mprotect 226 -#define __NR_msync 227 -#define __NR_mlock 228 -#define __NR_munlock 229 -#define __NR_mlockall 230 -#define __NR_munlockall 231 -#define __NR_mincore 232 -#define __NR_madvise 233 -#define __NR_remap_file_pages 234 -#define __NR_mbind 235 -#define __NR_get_mempolicy 236 -#define __NR_set_mempolicy 237 -#define __NR_migrate_pages 238 -#define __NR_move_pages 239 -#define __NR_rt_tgsigqueueinfo 240 -#define __NR_perf_event_open 241 -#define __NR_accept4 242 -#define __NR_recvmmsg 243 -#define __NR_arch_specific_syscall 244 -#define __NR_wait4 260 -#define __NR_prlimit64 261 -#define __NR_fanotify_init 262 -#define __NR_fanotify_mark 263 -#define __NR_name_to_handle_at 264 -#define __NR_open_by_handle_at 265 -#define __NR_clock_adjtime 266 -#define __NR_syncfs 267 -#define __NR_setns 268 -#define __NR_sendmmsg 269 -#define __NR_process_vm_readv 270 -#define __NR_process_vm_writev 271 -#define __NR_kcmp 272 -#define __NR_finit_module 273 -#define __NR_sched_setattr 274 -#define __NR_sched_getattr 275 -#define __NR_renameat2 276 -#define __NR_seccomp 277 -#define __NR_getrandom 278 -#define __NR_memfd_create 279 -#define __NR_bpf 280 -#define __NR_execveat 281 -#define __NR_userfaultfd 282 -#define __NR_membarrier 283 -#define __NR_mlock2 284 -#define __NR_copy_file_range 285 -#define __NR_preadv2 286 -#define __NR_pwritev2 287 -#define __NR_pkey_mprotect 288 -#define __NR_pkey_alloc 289 -#define __NR_pkey_free 290 -#define __NR_statx 291 -#define __NR_io_pgetevents 292 -#define __NR_rseq 293 -#define __NR_kexec_file_load 294 -#define __NR_pidfd_send_signal 424 -#define __NR_io_uring_setup 425 -#define __NR_io_uring_enter 426 -#define __NR_io_uring_register 427 -#define __NR_open_tree 428 -#define __NR_move_mount 429 -#define __NR_fsopen 430 -#define __NR_fsconfig 431 -#define __NR_fsmount 432 -#define __NR_fspick 433 -#define __NR_pidfd_open 434 -#define __NR_clone3 435 -#define __NR_close_range 436 -#define __NR_openat2 437 -#define __NR_pidfd_getfd 438 -#define __NR_faccessat2 439 -#define __NR_process_madvise 440 -#define __NR_epoll_pwait2 441 -#define __NR_mount_setattr 442 -#define __NR_landlock_create_ruleset 444 -#define __NR_landlock_add_rule 445 -#define __NR_landlock_restrict_self 446 -#define __NR_process_mrelease 448 -#define __NR_futex_waitv 449 -#define __NR_set_mempolicy_home_node 450 -#define __NR_cachestat 451 -#define __NR_fchmodat2 452 - -#define __NR_sysriscv __NR_arch_specific_syscall -#define __NR_riscv_flush_icache (__NR_sysriscv + 15) diff --git a/lib/libc/musl/arch/s390x/bits/alltypes.h.in b/lib/libc/musl/arch/s390x/bits/alltypes.h.in deleted file mode 100644 index 6c0eb7f4b8..0000000000 --- a/lib/libc/musl/arch/s390x/bits/alltypes.h.in +++ /dev/null @@ -1,19 +0,0 @@ -#define _Addr long -#define _Int64 long -#define _Reg long - -#define __BYTE_ORDER 4321 -#define __LONG_MAX 0x7fffffffffffffffL - -#ifndef __cplusplus -TYPEDEF int wchar_t; -#endif - -#if defined(__FLT_EVAL_METHOD__) && __FLT_EVAL_METHOD__ == 1 -TYPEDEF double float_t; -#else -TYPEDEF float float_t; -#endif -TYPEDEF double double_t; - -TYPEDEF struct { long long __ll; long double __ld; } max_align_t; diff --git a/lib/libc/musl/arch/s390x/bits/syscall.h.in b/lib/libc/musl/arch/s390x/bits/syscall.h.in deleted file mode 100644 index e60711a6e1..0000000000 --- a/lib/libc/musl/arch/s390x/bits/syscall.h.in +++ /dev/null @@ -1,371 +0,0 @@ -#define __NR_exit 1 -#define __NR_fork 2 -#define __NR_read 3 -#define __NR_write 4 -#define __NR_open 5 -#define __NR_close 6 -#define __NR_restart_syscall 7 -#define __NR_creat 8 -#define __NR_link 9 -#define __NR_unlink 10 -#define __NR_execve 11 -#define __NR_chdir 12 -#define __NR_mknod 14 -#define __NR_chmod 15 -#define __NR_lseek 19 -#define __NR_getpid 20 -#define __NR_mount 21 -#define __NR_umount 22 -#define __NR_ptrace 26 -#define __NR_alarm 27 -#define __NR_pause 29 -#define __NR_utime 30 -#define __NR_access 33 -#define __NR_nice 34 -#define __NR_sync 36 -#define __NR_kill 37 -#define __NR_rename 38 -#define __NR_mkdir 39 -#define __NR_rmdir 40 -#define __NR_dup 41 -#define __NR_pipe 42 -#define __NR_times 43 -#define __NR_brk 45 -#define __NR_signal 48 -#define __NR_acct 51 -#define __NR_umount2 52 -#define __NR_ioctl 54 -#define __NR_fcntl 55 -#define __NR_setpgid 57 -#define __NR_umask 60 -#define __NR_chroot 61 -#define __NR_ustat 62 -#define __NR_dup2 63 -#define __NR_getppid 64 -#define __NR_getpgrp 65 -#define __NR_setsid 66 -#define __NR_sigaction 67 -#define __NR_sigsuspend 72 -#define __NR_sigpending 73 -#define __NR_sethostname 74 -#define __NR_setrlimit 75 -#define __NR_getrusage 77 -#define __NR_gettimeofday 78 -#define __NR_settimeofday 79 -#define __NR_symlink 83 -#define __NR_readlink 85 -#define __NR_uselib 86 -#define __NR_swapon 87 -#define __NR_reboot 88 -#define __NR_readdir 89 -#define __NR_mmap 90 -#define __NR_munmap 91 -#define __NR_truncate 92 -#define __NR_ftruncate 93 -#define __NR_fchmod 94 -#define __NR_getpriority 96 -#define __NR_setpriority 97 -#define __NR_statfs 99 -#define __NR_fstatfs 100 -#define __NR_socketcall 102 -#define __NR_syslog 103 -#define __NR_setitimer 104 -#define __NR_getitimer 105 -#define __NR_stat 106 -#define __NR_lstat 107 -#define __NR_fstat 108 -#define __NR_lookup_dcookie 110 -#define __NR_vhangup 111 -#define __NR_idle 112 -#define __NR_wait4 114 -#define __NR_swapoff 115 -#define __NR_sysinfo 116 -#define __NR_ipc 117 -#define __NR_fsync 118 -#define __NR_sigreturn 119 -#define __NR_clone 120 -#define __NR_setdomainname 121 -#define __NR_uname 122 -#define __NR_adjtimex 124 -#define __NR_mprotect 125 -#define __NR_sigprocmask 126 -#define __NR_create_module 127 -#define __NR_init_module 128 -#define __NR_delete_module 129 -#define __NR_get_kernel_syms 130 -#define __NR_quotactl 131 -#define __NR_getpgid 132 -#define __NR_fchdir 133 -#define __NR_bdflush 134 -#define __NR_sysfs 135 -#define __NR_personality 136 -#define __NR_afs_syscall 137 -#define __NR_getdents 141 -#define __NR_select 142 -#define __NR_flock 143 -#define __NR_msync 144 -#define __NR_readv 145 -#define __NR_writev 146 -#define __NR_getsid 147 -#define __NR_fdatasync 148 -#define __NR__sysctl 149 -#define __NR_mlock 150 -#define __NR_munlock 151 -#define __NR_mlockall 152 -#define __NR_munlockall 153 -#define __NR_sched_setparam 154 -#define __NR_sched_getparam 155 -#define __NR_sched_setscheduler 156 -#define __NR_sched_getscheduler 157 -#define __NR_sched_yield 158 -#define __NR_sched_get_priority_max 159 -#define __NR_sched_get_priority_min 160 -#define __NR_sched_rr_get_interval 161 -#define __NR_nanosleep 162 -#define __NR_mremap 163 -#define __NR_query_module 167 -#define __NR_poll 168 -#define __NR_nfsservctl 169 -#define __NR_prctl 172 -#define __NR_rt_sigreturn 173 -#define __NR_rt_sigaction 174 -#define __NR_rt_sigprocmask 175 -#define __NR_rt_sigpending 176 -#define __NR_rt_sigtimedwait 177 -#define __NR_rt_sigqueueinfo 178 -#define __NR_rt_sigsuspend 179 -#define __NR_pread64 180 -#define __NR_pwrite64 181 -#define __NR_getcwd 183 -#define __NR_capget 184 -#define __NR_capset 185 -#define __NR_sigaltstack 186 -#define __NR_sendfile 187 -#define __NR_getpmsg 188 -#define __NR_putpmsg 189 -#define __NR_vfork 190 -#define __NR_getrlimit 191 -#define __NR_lchown 198 -#define __NR_getuid 199 -#define __NR_getgid 200 -#define __NR_geteuid 201 -#define __NR_getegid 202 -#define __NR_setreuid 203 -#define __NR_setregid 204 -#define __NR_getgroups 205 -#define __NR_setgroups 206 -#define __NR_fchown 207 -#define __NR_setresuid 208 -#define __NR_getresuid 209 -#define __NR_setresgid 210 -#define __NR_getresgid 211 -#define __NR_chown 212 -#define __NR_setuid 213 -#define __NR_setgid 214 -#define __NR_setfsuid 215 -#define __NR_setfsgid 216 -#define __NR_pivot_root 217 -#define __NR_mincore 218 -#define __NR_madvise 219 -#define __NR_getdents64 220 -#define __NR_readahead 222 -#define __NR_setxattr 224 -#define __NR_lsetxattr 225 -#define __NR_fsetxattr 226 -#define __NR_getxattr 227 -#define __NR_lgetxattr 228 -#define __NR_fgetxattr 229 -#define __NR_listxattr 230 -#define __NR_llistxattr 231 -#define __NR_flistxattr 232 -#define __NR_removexattr 233 -#define __NR_lremovexattr 234 -#define __NR_fremovexattr 235 -#define __NR_gettid 236 -#define __NR_tkill 237 -#define __NR_futex 238 -#define __NR_sched_setaffinity 239 -#define __NR_sched_getaffinity 240 -#define __NR_tgkill 241 -#define __NR_io_setup 243 -#define __NR_io_destroy 244 -#define __NR_io_getevents 245 -#define __NR_io_submit 246 -#define __NR_io_cancel 247 -#define __NR_exit_group 248 -#define __NR_epoll_create 249 -#define __NR_epoll_ctl 250 -#define __NR_epoll_wait 251 -#define __NR_set_tid_address 252 -#define __NR_fadvise64 253 -#define __NR_timer_create 254 -#define __NR_timer_settime 255 -#define __NR_timer_gettime 256 -#define __NR_timer_getoverrun 257 -#define __NR_timer_delete 258 -#define __NR_clock_settime 259 -#define __NR_clock_gettime 260 -#define __NR_clock_getres 261 -#define __NR_clock_nanosleep 262 -#define __NR_statfs64 265 -#define __NR_fstatfs64 266 -#define __NR_remap_file_pages 267 -#define __NR_mbind 268 -#define __NR_get_mempolicy 269 -#define __NR_set_mempolicy 270 -#define __NR_mq_open 271 -#define __NR_mq_unlink 272 -#define __NR_mq_timedsend 273 -#define __NR_mq_timedreceive 274 -#define __NR_mq_notify 275 -#define __NR_mq_getsetattr 276 -#define __NR_kexec_load 277 -#define __NR_add_key 278 -#define __NR_request_key 279 -#define __NR_keyctl 280 -#define __NR_waitid 281 -#define __NR_ioprio_set 282 -#define __NR_ioprio_get 283 -#define __NR_inotify_init 284 -#define __NR_inotify_add_watch 285 -#define __NR_inotify_rm_watch 286 -#define __NR_migrate_pages 287 -#define __NR_openat 288 -#define __NR_mkdirat 289 -#define __NR_mknodat 290 -#define __NR_fchownat 291 -#define __NR_futimesat 292 -#define __NR_newfstatat 293 -#define __NR_unlinkat 294 -#define __NR_renameat 295 -#define __NR_linkat 296 -#define __NR_symlinkat 297 -#define __NR_readlinkat 298 -#define __NR_fchmodat 299 -#define __NR_faccessat 300 -#define __NR_pselect6 301 -#define __NR_ppoll 302 -#define __NR_unshare 303 -#define __NR_set_robust_list 304 -#define __NR_get_robust_list 305 -#define __NR_splice 306 -#define __NR_sync_file_range 307 -#define __NR_tee 308 -#define __NR_vmsplice 309 -#define __NR_move_pages 310 -#define __NR_getcpu 311 -#define __NR_epoll_pwait 312 -#define __NR_utimes 313 -#define __NR_fallocate 314 -#define __NR_utimensat 315 -#define __NR_signalfd 316 -#define __NR_timerfd 317 -#define __NR_eventfd 318 -#define __NR_timerfd_create 319 -#define __NR_timerfd_settime 320 -#define __NR_timerfd_gettime 321 -#define __NR_signalfd4 322 -#define __NR_eventfd2 323 -#define __NR_inotify_init1 324 -#define __NR_pipe2 325 -#define __NR_dup3 326 -#define __NR_epoll_create1 327 -#define __NR_preadv 328 -#define __NR_pwritev 329 -#define __NR_rt_tgsigqueueinfo 330 -#define __NR_perf_event_open 331 -#define __NR_fanotify_init 332 -#define __NR_fanotify_mark 333 -#define __NR_prlimit64 334 -#define __NR_name_to_handle_at 335 -#define __NR_open_by_handle_at 336 -#define __NR_clock_adjtime 337 -#define __NR_syncfs 338 -#define __NR_setns 339 -#define __NR_process_vm_readv 340 -#define __NR_process_vm_writev 341 -#define __NR_s390_runtime_instr 342 -#define __NR_kcmp 343 -#define __NR_finit_module 344 -#define __NR_sched_setattr 345 -#define __NR_sched_getattr 346 -#define __NR_renameat2 347 -#define __NR_seccomp 348 -#define __NR_getrandom 349 -#define __NR_memfd_create 350 -#define __NR_bpf 351 -#define __NR_s390_pci_mmio_write 352 -#define __NR_s390_pci_mmio_read 353 -#define __NR_execveat 354 -#define __NR_userfaultfd 355 -#define __NR_membarrier 356 -#define __NR_recvmmsg 357 -#define __NR_sendmmsg 358 -#define __NR_socket 359 -#define __NR_socketpair 360 -#define __NR_bind 361 -#define __NR_connect 362 -#define __NR_listen 363 -#define __NR_accept4 364 -#define __NR_getsockopt 365 -#define __NR_setsockopt 366 -#define __NR_getsockname 367 -#define __NR_getpeername 368 -#define __NR_sendto 369 -#define __NR_sendmsg 370 -#define __NR_recvfrom 371 -#define __NR_recvmsg 372 -#define __NR_shutdown 373 -#define __NR_mlock2 374 -#define __NR_copy_file_range 375 -#define __NR_preadv2 376 -#define __NR_pwritev2 377 -#define __NR_s390_guarded_storage 378 -#define __NR_statx 379 -#define __NR_s390_sthyi 380 -#define __NR_kexec_file_load 381 -#define __NR_io_pgetevents 382 -#define __NR_rseq 383 -#define __NR_pkey_mprotect 384 -#define __NR_pkey_alloc 385 -#define __NR_pkey_free 386 -#define __NR_semtimedop 392 -#define __NR_semget 393 -#define __NR_semctl 394 -#define __NR_shmget 395 -#define __NR_shmctl 396 -#define __NR_shmat 397 -#define __NR_shmdt 398 -#define __NR_msgget 399 -#define __NR_msgsnd 400 -#define __NR_msgrcv 401 -#define __NR_msgctl 402 -#define __NR_pidfd_send_signal 424 -#define __NR_io_uring_setup 425 -#define __NR_io_uring_enter 426 -#define __NR_io_uring_register 427 -#define __NR_open_tree 428 -#define __NR_move_mount 429 -#define __NR_fsopen 430 -#define __NR_fsconfig 431 -#define __NR_fsmount 432 -#define __NR_fspick 433 -#define __NR_pidfd_open 434 -#define __NR_clone3 435 -#define __NR_close_range 436 -#define __NR_openat2 437 -#define __NR_pidfd_getfd 438 -#define __NR_faccessat2 439 -#define __NR_process_madvise 440 -#define __NR_epoll_pwait2 441 -#define __NR_mount_setattr 442 -#define __NR_landlock_create_ruleset 444 -#define __NR_landlock_add_rule 445 -#define __NR_landlock_restrict_self 446 -#define __NR_memfd_secret 447 -#define __NR_process_mrelease 448 -#define __NR_futex_waitv 449 -#define __NR_set_mempolicy_home_node 450 -#define __NR_cachestat 451 -#define __NR_fchmodat2 452 - diff --git a/lib/libc/musl/arch/x32/atomic_arch.h b/lib/libc/musl/arch/x32/atomic_arch.h new file mode 100644 index 0000000000..918c2d4eec --- /dev/null +++ b/lib/libc/musl/arch/x32/atomic_arch.h @@ -0,0 +1,121 @@ +#define a_cas a_cas +static inline int a_cas(volatile int *p, int t, int s) +{ + __asm__ __volatile__ ( + "lock ; cmpxchg %3, %1" + : "=a"(t), "=m"(*p) : "a"(t), "r"(s) : "memory" ); + return t; +} + +#define a_swap a_swap +static inline int a_swap(volatile int *p, int v) +{ + __asm__ __volatile__( + "xchg %0, %1" + : "=r"(v), "=m"(*p) : "0"(v) : "memory" ); + return v; +} + +#define a_fetch_add a_fetch_add +static inline int a_fetch_add(volatile int *p, int v) +{ + __asm__ __volatile__( + "lock ; xadd %0, %1" + : "=r"(v), "=m"(*p) : "0"(v) : "memory" ); + return v; +} + +#define a_and a_and +static inline void a_and(volatile int *p, int v) +{ + __asm__ __volatile__( + "lock ; and %1, %0" + : "=m"(*p) : "r"(v) : "memory" ); +} + +#define a_or a_or +static inline void a_or(volatile int *p, int v) +{ + __asm__ __volatile__( + "lock ; or %1, %0" + : "=m"(*p) : "r"(v) : "memory" ); +} + +#define a_and_64 a_and_64 +static inline void a_and_64(volatile uint64_t *p, uint64_t v) +{ + __asm__ __volatile( + "lock ; and %1, %0" + : "=m"(*p) : "r"(v) : "memory" ); +} + +#define a_or_64 a_or_64 +static inline void a_or_64(volatile uint64_t *p, uint64_t v) +{ + __asm__ __volatile__( + "lock ; or %1, %0" + : "=m"(*p) : "r"(v) : "memory" ); +} + +#define a_inc a_inc +static inline void a_inc(volatile int *p) +{ + __asm__ __volatile__( + "lock ; incl %0" + : "=m"(*p) : "m"(*p) : "memory" ); +} + +#define a_dec a_dec +static inline void a_dec(volatile int *p) +{ + __asm__ __volatile__( + "lock ; decl %0" + : "=m"(*p) : "m"(*p) : "memory" ); +} + +#define a_store a_store +static inline void a_store(volatile int *p, int x) +{ + __asm__ __volatile__( + "mov %1, %0 ; lock ; orl $0,(%%rsp)" + : "=m"(*p) : "r"(x) : "memory" ); +} + +#define a_barrier a_barrier +static inline void a_barrier() +{ + __asm__ __volatile__( "" : : : "memory" ); +} + +#define a_spin a_spin +static inline void a_spin() +{ + __asm__ __volatile__( "pause" : : : "memory" ); +} + +#define a_crash a_crash +static inline void a_crash() +{ + __asm__ __volatile__( "hlt" : : : "memory" ); +} + +#define a_ctz_64 a_ctz_64 +static inline int a_ctz_64(uint64_t x) +{ + __asm__( "bsf %1,%0" : "=r"(x) : "r"(x) ); + return x; +} + +#define a_ctz_32 a_ctz_32 +static inline int a_ctz_32(uint32_t x) +{ + __asm__( "bsf %1,%0" : "=r"(x) : "r"(x) ); + return x; +} + +#define a_clz_64 a_clz_64 +static inline int a_clz_64(uint64_t x) +{ + __asm__( "bsr %1,%0 ; xor $63,%0" : "=r"(x) : "r"(x) ); + return x; +} diff --git a/lib/libc/musl/arch/x32/bits/fcntl.h b/lib/libc/musl/arch/x32/bits/fcntl.h new file mode 100644 index 0000000000..08627f812a --- /dev/null +++ b/lib/libc/musl/arch/x32/bits/fcntl.h @@ -0,0 +1,40 @@ +#define O_CREAT 0100 +#define O_EXCL 0200 +#define O_NOCTTY 0400 +#define O_TRUNC 01000 +#define O_APPEND 02000 +#define O_NONBLOCK 04000 +#define O_DSYNC 010000 +#define O_SYNC 04010000 +#define O_RSYNC 04010000 +#define O_DIRECTORY 0200000 +#define O_NOFOLLOW 0400000 +#define O_CLOEXEC 02000000 + +#define O_ASYNC 020000 +#define O_DIRECT 040000 +#define O_LARGEFILE 0100000 +#define O_NOATIME 01000000 +#define O_PATH 010000000 +#define O_TMPFILE 020200000 +#define O_NDELAY O_NONBLOCK + +#define F_DUPFD 0 +#define F_GETFD 1 +#define F_SETFD 2 +#define F_GETFL 3 +#define F_SETFL 4 + +#define F_SETOWN 8 +#define F_GETOWN 9 +#define F_SETSIG 10 +#define F_GETSIG 11 + +#define F_GETLK 5 +#define F_SETLK 6 +#define F_SETLKW 7 + +#define F_SETOWN_EX 15 +#define F_GETOWN_EX 16 + +#define F_GETOWNER_UIDS 17 diff --git a/lib/libc/musl/arch/x32/bits/fenv.h b/lib/libc/musl/arch/x32/bits/fenv.h new file mode 100644 index 0000000000..24df0417f2 --- /dev/null +++ b/lib/libc/musl/arch/x32/bits/fenv.h @@ -0,0 +1,34 @@ +#define FE_INVALID 1 +#define __FE_DENORM 2 +#define FE_DIVBYZERO 4 +#define FE_OVERFLOW 8 +#define FE_UNDERFLOW 16 +#define FE_INEXACT 32 + +#define FE_ALL_EXCEPT 63 + +#define FE_TONEAREST 0 +#define FE_DOWNWARD 0x400 +#define FE_UPWARD 0x800 +#define FE_TOWARDZERO 0xc00 + +typedef unsigned short fexcept_t; + +typedef struct { + unsigned short __control_word; + unsigned short __unused1; + unsigned short __status_word; + unsigned short __unused2; + unsigned short __tags; + unsigned short __unused3; + unsigned int __eip; + unsigned short __cs_selector; + unsigned int __opcode:11; + unsigned int __unused4:5; + unsigned int __data_offset; + unsigned short __data_selector; + unsigned short __unused5; + unsigned int __mxcsr; +} fenv_t; + +#define FE_DFL_ENV ((const fenv_t *) -1) diff --git a/lib/libc/musl/arch/x32/bits/float.h b/lib/libc/musl/arch/x32/bits/float.h new file mode 100644 index 0000000000..4d8e78641b --- /dev/null +++ b/lib/libc/musl/arch/x32/bits/float.h @@ -0,0 +1,20 @@ +#ifdef __FLT_EVAL_METHOD__ +#define FLT_EVAL_METHOD __FLT_EVAL_METHOD__ +#else +#define FLT_EVAL_METHOD 0 +#endif + +#define LDBL_TRUE_MIN 3.6451995318824746025e-4951L +#define LDBL_MIN 3.3621031431120935063e-4932L +#define LDBL_MAX 1.1897314953572317650e+4932L +#define LDBL_EPSILON 1.0842021724855044340e-19L + +#define LDBL_MANT_DIG 64 +#define LDBL_MIN_EXP (-16381) +#define LDBL_MAX_EXP 16384 + +#define LDBL_DIG 18 +#define LDBL_MIN_10_EXP (-4931) +#define LDBL_MAX_10_EXP 4932 + +#define DECIMAL_DIG 21 diff --git a/lib/libc/musl/arch/x32/bits/io.h b/lib/libc/musl/arch/x32/bits/io.h new file mode 100644 index 0000000000..dd5bddc967 --- /dev/null +++ b/lib/libc/musl/arch/x32/bits/io.h @@ -0,0 +1,77 @@ +static __inline void outb(unsigned char __val, unsigned short __port) +{ + __asm__ volatile ("outb %0,%1" : : "a" (__val), "dN" (__port)); +} + +static __inline void outw(unsigned short __val, unsigned short __port) +{ + __asm__ volatile ("outw %0,%1" : : "a" (__val), "dN" (__port)); +} + +static __inline void outl(unsigned int __val, unsigned short __port) +{ + __asm__ volatile ("outl %0,%1" : : "a" (__val), "dN" (__port)); +} + +static __inline unsigned char inb(unsigned short __port) +{ + unsigned char __val; + __asm__ volatile ("inb %1,%0" : "=a" (__val) : "dN" (__port)); + return __val; +} + +static __inline unsigned short inw(unsigned short __port) +{ + unsigned short __val; + __asm__ volatile ("inw %1,%0" : "=a" (__val) : "dN" (__port)); + return __val; +} + +static __inline unsigned int inl(unsigned short __port) +{ + unsigned int __val; + __asm__ volatile ("inl %1,%0" : "=a" (__val) : "dN" (__port)); + return __val; +} + +static __inline void outsb(unsigned short __port, const void *__buf, unsigned long __n) +{ + __asm__ volatile ("cld; rep; outsb" + : "+S" (__buf), "+c" (__n) + : "d" (__port)); +} + +static __inline void outsw(unsigned short __port, const void *__buf, unsigned long __n) +{ + __asm__ volatile ("cld; rep; outsw" + : "+S" (__buf), "+c" (__n) + : "d" (__port)); +} + +static __inline void outsl(unsigned short __port, const void *__buf, unsigned long __n) +{ + __asm__ volatile ("cld; rep; outsl" + : "+S" (__buf), "+c"(__n) + : "d" (__port)); +} + +static __inline void insb(unsigned short __port, void *__buf, unsigned long __n) +{ + __asm__ volatile ("cld; rep; insb" + : "+D" (__buf), "+c" (__n) + : "d" (__port)); +} + +static __inline void insw(unsigned short __port, void *__buf, unsigned long __n) +{ + __asm__ volatile ("cld; rep; insw" + : "+D" (__buf), "+c" (__n) + : "d" (__port)); +} + +static __inline void insl(unsigned short __port, void *__buf, unsigned long __n) +{ + __asm__ volatile ("cld; rep; insl" + : "+D" (__buf), "+c" (__n) + : "d" (__port)); +} diff --git a/lib/libc/musl/arch/x32/bits/ioctl_fix.h b/lib/libc/musl/arch/x32/bits/ioctl_fix.h new file mode 100644 index 0000000000..83b957bddb --- /dev/null +++ b/lib/libc/musl/arch/x32/bits/ioctl_fix.h @@ -0,0 +1,4 @@ +#undef SIOCGSTAMP +#undef SIOCGSTAMPNS +#define SIOCGSTAMP 0x8906 +#define SIOCGSTAMPNS 0x8907 diff --git a/lib/libc/musl/arch/x32/bits/ipc.h b/lib/libc/musl/arch/x32/bits/ipc.h new file mode 100644 index 0000000000..a12380f638 --- /dev/null +++ b/lib/libc/musl/arch/x32/bits/ipc.h @@ -0,0 +1,11 @@ +struct ipc_perm { + key_t __ipc_perm_key; + uid_t uid; + gid_t gid; + uid_t cuid; + gid_t cgid; + mode_t mode; + int __ipc_perm_seq; + long long __pad1; + long long __pad2; +}; diff --git a/lib/libc/musl/arch/x32/bits/limits.h b/lib/libc/musl/arch/x32/bits/limits.h new file mode 100644 index 0000000000..07743b6fd6 --- /dev/null +++ b/lib/libc/musl/arch/x32/bits/limits.h @@ -0,0 +1 @@ +#define PAGESIZE 4096 diff --git a/lib/libc/musl/arch/x32/bits/mman.h b/lib/libc/musl/arch/x32/bits/mman.h new file mode 100644 index 0000000000..ba2d6f7a83 --- /dev/null +++ b/lib/libc/musl/arch/x32/bits/mman.h @@ -0,0 +1 @@ +#define MAP_32BIT 0x40 diff --git a/lib/libc/musl/arch/x32/bits/msg.h b/lib/libc/musl/arch/x32/bits/msg.h new file mode 100644 index 0000000000..63ae987734 --- /dev/null +++ b/lib/libc/musl/arch/x32/bits/msg.h @@ -0,0 +1,15 @@ +struct msqid_ds { + struct ipc_perm msg_perm; + time_t msg_stime; + time_t msg_rtime; + time_t msg_ctime; + unsigned long msg_cbytes; + long __unused1; + msgqnum_t msg_qnum; + long __unused2; + msglen_t msg_qbytes; + long __unused3; + pid_t msg_lspid; + pid_t msg_lrpid; + unsigned long long __unused[2]; +}; diff --git a/lib/libc/musl/arch/x32/bits/posix.h b/lib/libc/musl/arch/x32/bits/posix.h new file mode 100644 index 0000000000..30a38714f3 --- /dev/null +++ b/lib/libc/musl/arch/x32/bits/posix.h @@ -0,0 +1,2 @@ +#define _POSIX_V6_ILP32_OFFBIG 1 +#define _POSIX_V7_ILP32_OFFBIG 1 diff --git a/lib/libc/musl/arch/x32/bits/ptrace.h b/lib/libc/musl/arch/x32/bits/ptrace.h new file mode 100644 index 0000000000..7f8a09b521 --- /dev/null +++ b/lib/libc/musl/arch/x32/bits/ptrace.h @@ -0,0 +1,13 @@ +#define PTRACE_GET_THREAD_AREA 25 +#define PTRACE_SET_THREAD_AREA 26 +#define PTRACE_ARCH_PRCTL 30 +#define PTRACE_SYSEMU 31 +#define PTRACE_SYSEMU_SINGLESTEP 32 +#define PTRACE_SINGLEBLOCK 33 + +#define PT_GET_THREAD_AREA PTRACE_GET_THREAD_AREA +#define PT_SET_THREAD_AREA PTRACE_SET_THREAD_AREA +#define PT_ARCH_PRCTL PTRACE_ARCH_PRCTL +#define PT_SYSEMU PTRACE_SYSEMU +#define PT_SYSEMU_SINGLESTEP PTRACE_SYSEMU_SINGLESTEP +#define PT_STEPBLOCK PTRACE_SINGLEBLOCK diff --git a/lib/libc/musl/arch/x32/bits/reg.h b/lib/libc/musl/arch/x32/bits/reg.h new file mode 100644 index 0000000000..5faaef1aeb --- /dev/null +++ b/lib/libc/musl/arch/x32/bits/reg.h @@ -0,0 +1,29 @@ +#undef __WORDSIZE +#define __WORDSIZE 32 +#define R15 0 +#define R14 1 +#define R13 2 +#define R12 3 +#define RBP 4 +#define RBX 5 +#define R11 6 +#define R10 7 +#define R9 8 +#define R8 9 +#define RAX 10 +#define RCX 11 +#define RDX 12 +#define RSI 13 +#define RDI 14 +#define ORIG_RAX 15 +#define RIP 16 +#define CS 17 +#define EFLAGS 18 +#define RSP 19 +#define SS 20 +#define FS_BASE 21 +#define GS_BASE 22 +#define DS 23 +#define ES 24 +#define FS 25 +#define GS 26 diff --git a/lib/libc/musl/arch/x32/bits/sem.h b/lib/libc/musl/arch/x32/bits/sem.h new file mode 100644 index 0000000000..18745f4c84 --- /dev/null +++ b/lib/libc/musl/arch/x32/bits/sem.h @@ -0,0 +1,11 @@ +struct semid_ds { + struct ipc_perm sem_perm; + time_t sem_otime; + long long __unused1; + time_t sem_ctime; + long long __unused2; + unsigned short sem_nsems; + char __sem_nsems_pad[sizeof(long long)-sizeof(short)]; + long long __unused3; + long long __unused4; +}; diff --git a/lib/libc/musl/arch/x32/bits/setjmp.h b/lib/libc/musl/arch/x32/bits/setjmp.h new file mode 100644 index 0000000000..a9262a6470 --- /dev/null +++ b/lib/libc/musl/arch/x32/bits/setjmp.h @@ -0,0 +1 @@ +typedef unsigned long long __jmp_buf[8]; diff --git a/lib/libc/musl/arch/x32/bits/shm.h b/lib/libc/musl/arch/x32/bits/shm.h new file mode 100644 index 0000000000..fa88c1e976 --- /dev/null +++ b/lib/libc/musl/arch/x32/bits/shm.h @@ -0,0 +1,32 @@ +#define SHMLBA 4096 + +struct shmid_ds { + struct ipc_perm shm_perm; + size_t shm_segsz; + time_t shm_atime; + time_t shm_dtime; + time_t shm_ctime; + pid_t shm_cpid; + pid_t shm_lpid; + unsigned long shm_nattch; + unsigned long __pad0; + unsigned long long __pad1; + unsigned long long __pad2; +}; + +struct shminfo { + unsigned long shmmax, __pad0, shmmin, __pad1, shmmni, __pad2, + shmseg, __pad3, shmall, __pad4; + unsigned long long __unused[4]; +}; + +struct shm_info { + int __used_ids; + int __pad_ids; + unsigned long shm_tot, __pad0, shm_rss, __pad1, shm_swp, __pad2; + unsigned long __swap_attempts, __pad3, __swap_successes, __pad4; +} +#ifdef __GNUC__ +__attribute__((__aligned__(8))) +#endif +; diff --git a/lib/libc/musl/arch/x32/bits/signal.h b/lib/libc/musl/arch/x32/bits/signal.h new file mode 100644 index 0000000000..097be6f457 --- /dev/null +++ b/lib/libc/musl/arch/x32/bits/signal.h @@ -0,0 +1,153 @@ +#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ + || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) + +#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) +#define MINSIGSTKSZ 2048 +#define SIGSTKSZ 8192 +#endif + +#ifdef _GNU_SOURCE +enum { REG_R8 = 0 }; +#define REG_R8 REG_R8 +enum { REG_R9 = 1 }; +#define REG_R9 REG_R9 +enum { REG_R10 = 2 }; +#define REG_R10 REG_R10 +enum { REG_R11 = 3 }; +#define REG_R11 REG_R11 +enum { REG_R12 = 4 }; +#define REG_R12 REG_R12 +enum { REG_R13 = 5 }; +#define REG_R13 REG_R13 +enum { REG_R14 = 6 }; +#define REG_R14 REG_R14 +enum { REG_R15 = 7 }; +#define REG_R15 REG_R15 +enum { REG_RDI = 8 }; +#define REG_RDI REG_RDI +enum { REG_RSI = 9 }; +#define REG_RSI REG_RSI +enum { REG_RBP = 10 }; +#define REG_RBP REG_RBP +enum { REG_RBX = 11 }; +#define REG_RBX REG_RBX +enum { REG_RDX = 12 }; +#define REG_RDX REG_RDX +enum { REG_RAX = 13 }; +#define REG_RAX REG_RAX +enum { REG_RCX = 14 }; +#define REG_RCX REG_RCX +enum { REG_RSP = 15 }; +#define REG_RSP REG_RSP +enum { REG_RIP = 16 }; +#define REG_RIP REG_RIP +enum { REG_EFL = 17 }; +#define REG_EFL REG_EFL +enum { REG_CSGSFS = 18 }; +#define REG_CSGSFS REG_CSGSFS +enum { REG_ERR = 19 }; +#define REG_ERR REG_ERR +enum { REG_TRAPNO = 20 }; +#define REG_TRAPNO REG_TRAPNO +enum { REG_OLDMASK = 21 }; +#define REG_OLDMASK REG_OLDMASK +enum { REG_CR2 = 22 }; +#define REG_CR2 REG_CR2 +#endif + +#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) +typedef long long greg_t, gregset_t[23]; +typedef struct _fpstate { + unsigned short cwd, swd, ftw, fop; + unsigned long long rip, rdp; + unsigned mxcsr, mxcr_mask; + struct { + unsigned short significand[4], exponent, padding[3]; + } _st[8]; + struct { + unsigned element[4]; + } _xmm[16]; + unsigned padding[24]; +} *fpregset_t; +struct sigcontext { + unsigned long long r8, r9, r10, r11, r12, r13, r14, r15; + unsigned long long rdi, rsi, rbp, rbx, rdx, rax, rcx, rsp, rip, eflags; + unsigned short cs, gs, fs, __pad0; + unsigned long long err, trapno, oldmask, cr2; + struct _fpstate *fpstate; + unsigned long long __reserved1[8]; +}; +typedef struct { + gregset_t gregs; + fpregset_t fpregs; + unsigned long long __reserved1[8]; +} mcontext_t; +#else +typedef struct { + unsigned long long __space[32]; +} mcontext_t; +#endif + +struct sigaltstack { + void *ss_sp; + int ss_flags; + size_t ss_size; +}; + +typedef struct __ucontext { + unsigned long uc_flags; + struct __ucontext *uc_link; + stack_t uc_stack; + mcontext_t uc_mcontext; + sigset_t uc_sigmask; + unsigned long long __fpregs_mem[64]; +} ucontext_t; + +#define SA_NOCLDSTOP 1 +#define SA_NOCLDWAIT 2 +#define SA_SIGINFO 4 +#define SA_ONSTACK 0x08000000 +#define SA_RESTART 0x10000000 +#define SA_NODEFER 0x40000000 +#define SA_RESETHAND 0x80000000 +#define SA_RESTORER 0x04000000 + +#endif + +#define SIGHUP 1 +#define SIGINT 2 +#define SIGQUIT 3 +#define SIGILL 4 +#define SIGTRAP 5 +#define SIGABRT 6 +#define SIGIOT SIGABRT +#define SIGBUS 7 +#define SIGFPE 8 +#define SIGKILL 9 +#define SIGUSR1 10 +#define SIGSEGV 11 +#define SIGUSR2 12 +#define SIGPIPE 13 +#define SIGALRM 14 +#define SIGTERM 15 +#define SIGSTKFLT 16 +#define SIGCHLD 17 +#define SIGCONT 18 +#define SIGSTOP 19 +#define SIGTSTP 20 +#define SIGTTIN 21 +#define SIGTTOU 22 +#define SIGURG 23 +#define SIGXCPU 24 +#define SIGXFSZ 25 +#define SIGVTALRM 26 +#define SIGPROF 27 +#define SIGWINCH 28 +#define SIGIO 29 +#define SIGPOLL 29 +#define SIGPWR 30 +#define SIGSYS 31 +#define SIGUNUSED SIGSYS + +#define _NSIG 65 + diff --git a/lib/libc/musl/arch/x32/bits/socket.h b/lib/libc/musl/arch/x32/bits/socket.h new file mode 100644 index 0000000000..8d83001027 --- /dev/null +++ b/lib/libc/musl/arch/x32/bits/socket.h @@ -0,0 +1,5 @@ +#define SO_RCVTIMEO 20 +#define SO_SNDTIMEO 21 +#define SO_TIMESTAMP 29 +#define SO_TIMESTAMPNS 35 +#define SO_TIMESTAMPING 37 diff --git a/lib/libc/musl/arch/x32/bits/stat.h b/lib/libc/musl/arch/x32/bits/stat.h new file mode 100644 index 0000000000..1f3aa1ed19 --- /dev/null +++ b/lib/libc/musl/arch/x32/bits/stat.h @@ -0,0 +1,22 @@ +/* copied from kernel definition, but with padding replaced + * by the corresponding correctly-sized userspace types. */ + +struct stat { + dev_t st_dev; + ino_t st_ino; + nlink_t st_nlink; + + mode_t st_mode; + uid_t st_uid; + gid_t st_gid; + unsigned int __pad0; + dev_t st_rdev; + off_t st_size; + blksize_t st_blksize; + blkcnt_t st_blocks; + + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; + long long __unused[3]; +}; diff --git a/lib/libc/musl/arch/x32/bits/statfs.h b/lib/libc/musl/arch/x32/bits/statfs.h new file mode 100644 index 0000000000..79aec35d61 --- /dev/null +++ b/lib/libc/musl/arch/x32/bits/statfs.h @@ -0,0 +1,9 @@ +struct statfs { + unsigned long f_type, __pad0, f_bsize, __pad1; + fsblkcnt_t f_blocks, f_bfree, f_bavail; + fsfilcnt_t f_files, f_ffree; + fsid_t f_fsid; + unsigned long f_namelen, __pad2, f_frsize, __pad3; + unsigned long f_flags, __pad4; + unsigned long long f_spare[4]; +}; diff --git a/lib/libc/musl/arch/x32/bits/stdint.h b/lib/libc/musl/arch/x32/bits/stdint.h new file mode 100644 index 0000000000..d1b2712199 --- /dev/null +++ b/lib/libc/musl/arch/x32/bits/stdint.h @@ -0,0 +1,20 @@ +typedef int32_t int_fast16_t; +typedef int32_t int_fast32_t; +typedef uint32_t uint_fast16_t; +typedef uint32_t uint_fast32_t; + +#define INT_FAST16_MIN INT32_MIN +#define INT_FAST32_MIN INT32_MIN + +#define INT_FAST16_MAX INT32_MAX +#define INT_FAST32_MAX INT32_MAX + +#define UINT_FAST16_MAX UINT32_MAX +#define UINT_FAST32_MAX UINT32_MAX + +#define INTPTR_MIN INT32_MIN +#define INTPTR_MAX INT32_MAX +#define UINTPTR_MAX UINT32_MAX +#define PTRDIFF_MIN INT32_MIN +#define PTRDIFF_MAX INT32_MAX +#define SIZE_MAX UINT32_MAX diff --git a/lib/libc/musl/arch/x32/bits/user.h b/lib/libc/musl/arch/x32/bits/user.h new file mode 100644 index 0000000000..eac82a14bc --- /dev/null +++ b/lib/libc/musl/arch/x32/bits/user.h @@ -0,0 +1,41 @@ +#undef __WORDSIZE +#define __WORDSIZE 32 + +typedef struct user_fpregs_struct { + uint16_t cwd, swd, ftw, fop; + uint64_t rip, rdp; + uint32_t mxcsr, mxcr_mask; + uint32_t st_space[32], xmm_space[64], padding[24]; +} elf_fpregset_t; + +struct user_regs_struct { + unsigned long r15, r14, r13, r12, rbp, rbx, r11, r10, r9, r8; + unsigned long rax, rcx, rdx, rsi, rdi, orig_rax, rip; + unsigned long cs, eflags, rsp, ss, fs_base, gs_base, ds, es, fs, gs; +}; +#define ELF_NGREG 27 +typedef unsigned long long elf_greg_t, elf_gregset_t[ELF_NGREG]; + +struct user { + struct user_regs_struct regs; + int u_fpvalid; + struct user_fpregs_struct i387; + unsigned long u_tsize; + unsigned long u_dsize; + unsigned long u_ssize; + unsigned long start_code; + unsigned long start_stack; + long signal; + int reserved; + struct user_regs_struct *u_ar0; + struct user_fpregs_struct *u_fpstate; + unsigned long magic; + char u_comm[32]; + unsigned long u_debugreg[8]; +}; + +#define PAGE_MASK (~(PAGESIZE-1)) +#define NBPG PAGESIZE +#define UPAGES 1 +#define HOST_TEXT_START_ADDR (u.start_code) +#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) diff --git a/lib/libc/musl/arch/x32/crt_arch.h b/lib/libc/musl/arch/x32/crt_arch.h new file mode 100644 index 0000000000..3eec61bdcd --- /dev/null +++ b/lib/libc/musl/arch/x32/crt_arch.h @@ -0,0 +1,12 @@ +__asm__( +".text \n" +".global " START " \n" +START ": \n" +" xor %rbp,%rbp \n" +" mov %rsp,%rdi \n" +".weak _DYNAMIC \n" +".hidden _DYNAMIC \n" +" lea _DYNAMIC(%rip),%rsi \n" +" andq $-16,%rsp \n" +" call " START "_c \n" +); diff --git a/lib/libc/musl/arch/x32/ksigaction.h b/lib/libc/musl/arch/x32/ksigaction.h new file mode 100644 index 0000000000..c40e356842 --- /dev/null +++ b/lib/libc/musl/arch/x32/ksigaction.h @@ -0,0 +1,11 @@ +#include + +struct k_sigaction { + void (*handler)(int); + unsigned long flags; + void (*restorer)(void); + unsigned mask[2]; +}; + +hidden void __restore_rt(); +#define __restore __restore_rt diff --git a/lib/libc/musl/arch/x32/kstat.h b/lib/libc/musl/arch/x32/kstat.h new file mode 100644 index 0000000000..ce25fce35e --- /dev/null +++ b/lib/libc/musl/arch/x32/kstat.h @@ -0,0 +1,22 @@ +struct kstat { + dev_t st_dev; + ino_t st_ino; + nlink_t st_nlink; + + mode_t st_mode; + uid_t st_uid; + gid_t st_gid; + unsigned int __pad0; + dev_t st_rdev; + off_t st_size; + blksize_t st_blksize; + blkcnt_t st_blocks; + + long long st_atime_sec; + long st_atime_nsec; + long long st_mtime_sec; + long st_mtime_nsec; + long long st_ctime_sec; + long st_ctime_nsec; + long long __unused[3]; +}; diff --git a/lib/libc/musl/arch/x32/pthread_arch.h b/lib/libc/musl/arch/x32/pthread_arch.h new file mode 100644 index 0000000000..c1e7716d52 --- /dev/null +++ b/lib/libc/musl/arch/x32/pthread_arch.h @@ -0,0 +1,12 @@ +static inline uintptr_t __get_tp() +{ + uintptr_t tp; + __asm__ ("mov %%fs:0,%0" : "=r" (tp) ); + return tp; +} + +#define MC_PC gregs[REG_RIP] + +#define CANARY_PAD + +#define tls_mod_off_t unsigned long long diff --git a/lib/libc/musl/arch/x32/reloc.h b/lib/libc/musl/arch/x32/reloc.h new file mode 100644 index 0000000000..dc039adf5b --- /dev/null +++ b/lib/libc/musl/arch/x32/reloc.h @@ -0,0 +1,31 @@ +#define LDSO_ARCH "x32" + +/* FIXME: x32 is very strange in its use of 64-bit relocation types in + * a 32-bit environment. As long as the memory at reloc_addr is + * zero-filled prior to relocations, just treating 64-bit relocations + * as operating on 32-bit slots should be fine, but this should be + * checked. In particular, R_X86_64_64, R_X86_64_DTPOFF64, and + * R_X86_64_TPOFF64 may need checking. */ + +/* The R_X86_64_64, R_X86_64_DTPOFF32, and R_X86_64_TPOFF32 reloc types + * were previously mapped in the switch table form of this file; however, + * they do not seem to be used/usable for anything. If needed, new + * mappings will have to be added. */ + +#define REL_SYMBOLIC R_X86_64_32 +#define REL_OFFSET R_X86_64_PC32 +#define REL_GOT R_X86_64_GLOB_DAT +#define REL_PLT R_X86_64_JUMP_SLOT +#define REL_RELATIVE R_X86_64_RELATIVE +#define REL_COPY R_X86_64_COPY +#define REL_DTPMOD R_X86_64_DTPMOD64 +#define REL_DTPOFF R_X86_64_DTPOFF64 +#define REL_TPOFF R_X86_64_TPOFF64 + +#define CRTJMP(pc,sp) __asm__ __volatile__( \ + "mov %1,%%esp ; jmp *%0" : : "r"((uint64_t)(uintptr_t)pc), "r"(sp) : "memory" ) + +#define GETFUNCSYM(fp, sym, got) __asm__ ( \ + ".hidden " #sym "\n" \ + " lea " #sym "(%%rip),%0\n" \ + : "=r"(*fp) : : "memory" ) diff --git a/lib/libc/musl/arch/x32/syscall_arch.h b/lib/libc/musl/arch/x32/syscall_arch.h new file mode 100644 index 0000000000..e0111cc0ea --- /dev/null +++ b/lib/libc/musl/arch/x32/syscall_arch.h @@ -0,0 +1,93 @@ +#define __SYSCALL_LL_E(x) (x) +#define __SYSCALL_LL_O(x) (x) + +#define __scc(X) sizeof(1?(X):0ULL) < 8 ? (unsigned long) (X) : (long long) (X) +typedef long long syscall_arg_t; + +static __inline long __syscall0(long long n) +{ + unsigned long ret; + __asm__ __volatile__ ("syscall" : "=a"(ret) : "a"(n) : "rcx", "r11", "memory"); + return ret; +} + +static __inline long __syscall1(long long n, long long a1) +{ + unsigned long ret; + __asm__ __volatile__ ("syscall" : "=a"(ret) : "a"(n), "D"(a1) : "rcx", "r11", "memory"); + return ret; +} + +static __inline long __syscall2(long long n, long long a1, long long a2) +{ + unsigned long ret; + __asm__ __volatile__ ("syscall" : "=a"(ret) : "a"(n), "D"(a1), "S"(a2) + : "rcx", "r11", "memory"); + return ret; +} + +static __inline long __syscall3(long long n, long long a1, long long a2, long long a3) +{ + unsigned long ret; + __asm__ __volatile__ ("syscall" : "=a"(ret) : "a"(n), "D"(a1), "S"(a2), + "d"(a3) : "rcx", "r11", "memory"); + return ret; +} + +static __inline long __syscall4(long long n, long long a1, long long a2, long long a3, + long long a4_) +{ + unsigned long ret; + register long long a4 __asm__("r10") = a4_; + __asm__ __volatile__ ("syscall" : "=a"(ret) : "a"(n), "D"(a1), "S"(a2), + "d"(a3), "r"(a4): "rcx", "r11", "memory"); + return ret; +} + +static __inline long __syscall5(long long n, long long a1, long long a2, long long a3, + long long a4_, long long a5_) +{ + unsigned long ret; + register long long a4 __asm__("r10") = a4_; + register long long a5 __asm__("r8") = a5_; + __asm__ __volatile__ ("syscall" : "=a"(ret) : "a"(n), "D"(a1), "S"(a2), + "d"(a3), "r"(a4), "r"(a5) : "rcx", "r11", "memory"); + return ret; +} + +static __inline long __syscall6(long long n, long long a1, long long a2, long long a3, + long long a4_, long long a5_, long long a6_) +{ + unsigned long ret; + register long long a4 __asm__("r10") = a4_; + register long long a5 __asm__("r8") = a5_; + register long long a6 __asm__("r9") = a6_; + __asm__ __volatile__ ("syscall" : "=a"(ret) : "a"(n), "D"(a1), "S"(a2), + "d"(a3), "r"(a4), "r"(a5), "r"(a6) : "rcx", "r11", "memory"); + return ret; +} + +#undef SYS_futimesat + +#define SYS_clock_gettime64 SYS_clock_gettime +#define SYS_clock_settime64 SYS_clock_settime +#define SYS_clock_adjtime64 SYS_clock_adjtime +#define SYS_clock_nanosleep_time64 SYS_clock_nanosleep +#define SYS_timer_gettime64 SYS_timer_gettime +#define SYS_timer_settime64 SYS_timer_settime +#define SYS_timerfd_gettime64 SYS_timerfd_gettime +#define SYS_timerfd_settime64 SYS_timerfd_settime +#define SYS_utimensat_time64 SYS_utimensat +#define SYS_pselect6_time64 SYS_pselect6 +#define SYS_ppoll_time64 SYS_ppoll +#define SYS_recvmmsg_time64 SYS_recvmmsg +#define SYS_mq_timedsend_time64 SYS_mq_timedsend +#define SYS_mq_timedreceive_time64 SYS_mq_timedreceive +#define SYS_semtimedop_time64 SYS_semtimedop +#define SYS_rt_sigtimedwait_time64 SYS_rt_sigtimedwait +#define SYS_futex_time64 SYS_futex +#define SYS_sched_rr_get_interval_time64 SYS_sched_rr_get_interval +#define SYS_getrusage_time64 SYS_getrusage +#define SYS_wait4_time64 SYS_wait4 + +#define IPC_64 0 diff --git a/lib/libc/musl/arch/x86_64/bits/alltypes.h.in b/lib/libc/musl/arch/x86_64/bits/alltypes.h.in deleted file mode 100644 index 5cd8a2997f..0000000000 --- a/lib/libc/musl/arch/x86_64/bits/alltypes.h.in +++ /dev/null @@ -1,20 +0,0 @@ -#define _Addr long -#define _Int64 long -#define _Reg long - -#define __BYTE_ORDER 1234 -#define __LONG_MAX 0x7fffffffffffffffL - -#ifndef __cplusplus -TYPEDEF int wchar_t; -#endif - -#if defined(__FLT_EVAL_METHOD__) && __FLT_EVAL_METHOD__ == 2 -TYPEDEF long double float_t; -TYPEDEF long double double_t; -#else -TYPEDEF float float_t; -TYPEDEF double double_t; -#endif - -TYPEDEF struct { long long __ll; long double __ld; } max_align_t; diff --git a/lib/libc/musl/arch/x86_64/bits/syscall.h.in b/lib/libc/musl/arch/x86_64/bits/syscall.h.in deleted file mode 100644 index 6543bbba78..0000000000 --- a/lib/libc/musl/arch/x86_64/bits/syscall.h.in +++ /dev/null @@ -1,364 +0,0 @@ -#define __NR_read 0 -#define __NR_write 1 -#define __NR_open 2 -#define __NR_close 3 -#define __NR_stat 4 -#define __NR_fstat 5 -#define __NR_lstat 6 -#define __NR_poll 7 -#define __NR_lseek 8 -#define __NR_mmap 9 -#define __NR_mprotect 10 -#define __NR_munmap 11 -#define __NR_brk 12 -#define __NR_rt_sigaction 13 -#define __NR_rt_sigprocmask 14 -#define __NR_rt_sigreturn 15 -#define __NR_ioctl 16 -#define __NR_pread64 17 -#define __NR_pwrite64 18 -#define __NR_readv 19 -#define __NR_writev 20 -#define __NR_access 21 -#define __NR_pipe 22 -#define __NR_select 23 -#define __NR_sched_yield 24 -#define __NR_mremap 25 -#define __NR_msync 26 -#define __NR_mincore 27 -#define __NR_madvise 28 -#define __NR_shmget 29 -#define __NR_shmat 30 -#define __NR_shmctl 31 -#define __NR_dup 32 -#define __NR_dup2 33 -#define __NR_pause 34 -#define __NR_nanosleep 35 -#define __NR_getitimer 36 -#define __NR_alarm 37 -#define __NR_setitimer 38 -#define __NR_getpid 39 -#define __NR_sendfile 40 -#define __NR_socket 41 -#define __NR_connect 42 -#define __NR_accept 43 -#define __NR_sendto 44 -#define __NR_recvfrom 45 -#define __NR_sendmsg 46 -#define __NR_recvmsg 47 -#define __NR_shutdown 48 -#define __NR_bind 49 -#define __NR_listen 50 -#define __NR_getsockname 51 -#define __NR_getpeername 52 -#define __NR_socketpair 53 -#define __NR_setsockopt 54 -#define __NR_getsockopt 55 -#define __NR_clone 56 -#define __NR_fork 57 -#define __NR_vfork 58 -#define __NR_execve 59 -#define __NR_exit 60 -#define __NR_wait4 61 -#define __NR_kill 62 -#define __NR_uname 63 -#define __NR_semget 64 -#define __NR_semop 65 -#define __NR_semctl 66 -#define __NR_shmdt 67 -#define __NR_msgget 68 -#define __NR_msgsnd 69 -#define __NR_msgrcv 70 -#define __NR_msgctl 71 -#define __NR_fcntl 72 -#define __NR_flock 73 -#define __NR_fsync 74 -#define __NR_fdatasync 75 -#define __NR_truncate 76 -#define __NR_ftruncate 77 -#define __NR_getdents 78 -#define __NR_getcwd 79 -#define __NR_chdir 80 -#define __NR_fchdir 81 -#define __NR_rename 82 -#define __NR_mkdir 83 -#define __NR_rmdir 84 -#define __NR_creat 85 -#define __NR_link 86 -#define __NR_unlink 87 -#define __NR_symlink 88 -#define __NR_readlink 89 -#define __NR_chmod 90 -#define __NR_fchmod 91 -#define __NR_chown 92 -#define __NR_fchown 93 -#define __NR_lchown 94 -#define __NR_umask 95 -#define __NR_gettimeofday 96 -#define __NR_getrlimit 97 -#define __NR_getrusage 98 -#define __NR_sysinfo 99 -#define __NR_times 100 -#define __NR_ptrace 101 -#define __NR_getuid 102 -#define __NR_syslog 103 -#define __NR_getgid 104 -#define __NR_setuid 105 -#define __NR_setgid 106 -#define __NR_geteuid 107 -#define __NR_getegid 108 -#define __NR_setpgid 109 -#define __NR_getppid 110 -#define __NR_getpgrp 111 -#define __NR_setsid 112 -#define __NR_setreuid 113 -#define __NR_setregid 114 -#define __NR_getgroups 115 -#define __NR_setgroups 116 -#define __NR_setresuid 117 -#define __NR_getresuid 118 -#define __NR_setresgid 119 -#define __NR_getresgid 120 -#define __NR_getpgid 121 -#define __NR_setfsuid 122 -#define __NR_setfsgid 123 -#define __NR_getsid 124 -#define __NR_capget 125 -#define __NR_capset 126 -#define __NR_rt_sigpending 127 -#define __NR_rt_sigtimedwait 128 -#define __NR_rt_sigqueueinfo 129 -#define __NR_rt_sigsuspend 130 -#define __NR_sigaltstack 131 -#define __NR_utime 132 -#define __NR_mknod 133 -#define __NR_uselib 134 -#define __NR_personality 135 -#define __NR_ustat 136 -#define __NR_statfs 137 -#define __NR_fstatfs 138 -#define __NR_sysfs 139 -#define __NR_getpriority 140 -#define __NR_setpriority 141 -#define __NR_sched_setparam 142 -#define __NR_sched_getparam 143 -#define __NR_sched_setscheduler 144 -#define __NR_sched_getscheduler 145 -#define __NR_sched_get_priority_max 146 -#define __NR_sched_get_priority_min 147 -#define __NR_sched_rr_get_interval 148 -#define __NR_mlock 149 -#define __NR_munlock 150 -#define __NR_mlockall 151 -#define __NR_munlockall 152 -#define __NR_vhangup 153 -#define __NR_modify_ldt 154 -#define __NR_pivot_root 155 -#define __NR__sysctl 156 -#define __NR_prctl 157 -#define __NR_arch_prctl 158 -#define __NR_adjtimex 159 -#define __NR_setrlimit 160 -#define __NR_chroot 161 -#define __NR_sync 162 -#define __NR_acct 163 -#define __NR_settimeofday 164 -#define __NR_mount 165 -#define __NR_umount2 166 -#define __NR_swapon 167 -#define __NR_swapoff 168 -#define __NR_reboot 169 -#define __NR_sethostname 170 -#define __NR_setdomainname 171 -#define __NR_iopl 172 -#define __NR_ioperm 173 -#define __NR_create_module 174 -#define __NR_init_module 175 -#define __NR_delete_module 176 -#define __NR_get_kernel_syms 177 -#define __NR_query_module 178 -#define __NR_quotactl 179 -#define __NR_nfsservctl 180 -#define __NR_getpmsg 181 -#define __NR_putpmsg 182 -#define __NR_afs_syscall 183 -#define __NR_tuxcall 184 -#define __NR_security 185 -#define __NR_gettid 186 -#define __NR_readahead 187 -#define __NR_setxattr 188 -#define __NR_lsetxattr 189 -#define __NR_fsetxattr 190 -#define __NR_getxattr 191 -#define __NR_lgetxattr 192 -#define __NR_fgetxattr 193 -#define __NR_listxattr 194 -#define __NR_llistxattr 195 -#define __NR_flistxattr 196 -#define __NR_removexattr 197 -#define __NR_lremovexattr 198 -#define __NR_fremovexattr 199 -#define __NR_tkill 200 -#define __NR_time 201 -#define __NR_futex 202 -#define __NR_sched_setaffinity 203 -#define __NR_sched_getaffinity 204 -#define __NR_set_thread_area 205 -#define __NR_io_setup 206 -#define __NR_io_destroy 207 -#define __NR_io_getevents 208 -#define __NR_io_submit 209 -#define __NR_io_cancel 210 -#define __NR_get_thread_area 211 -#define __NR_lookup_dcookie 212 -#define __NR_epoll_create 213 -#define __NR_epoll_ctl_old 214 -#define __NR_epoll_wait_old 215 -#define __NR_remap_file_pages 216 -#define __NR_getdents64 217 -#define __NR_set_tid_address 218 -#define __NR_restart_syscall 219 -#define __NR_semtimedop 220 -#define __NR_fadvise64 221 -#define __NR_timer_create 222 -#define __NR_timer_settime 223 -#define __NR_timer_gettime 224 -#define __NR_timer_getoverrun 225 -#define __NR_timer_delete 226 -#define __NR_clock_settime 227 -#define __NR_clock_gettime 228 -#define __NR_clock_getres 229 -#define __NR_clock_nanosleep 230 -#define __NR_exit_group 231 -#define __NR_epoll_wait 232 -#define __NR_epoll_ctl 233 -#define __NR_tgkill 234 -#define __NR_utimes 235 -#define __NR_vserver 236 -#define __NR_mbind 237 -#define __NR_set_mempolicy 238 -#define __NR_get_mempolicy 239 -#define __NR_mq_open 240 -#define __NR_mq_unlink 241 -#define __NR_mq_timedsend 242 -#define __NR_mq_timedreceive 243 -#define __NR_mq_notify 244 -#define __NR_mq_getsetattr 245 -#define __NR_kexec_load 246 -#define __NR_waitid 247 -#define __NR_add_key 248 -#define __NR_request_key 249 -#define __NR_keyctl 250 -#define __NR_ioprio_set 251 -#define __NR_ioprio_get 252 -#define __NR_inotify_init 253 -#define __NR_inotify_add_watch 254 -#define __NR_inotify_rm_watch 255 -#define __NR_migrate_pages 256 -#define __NR_openat 257 -#define __NR_mkdirat 258 -#define __NR_mknodat 259 -#define __NR_fchownat 260 -#define __NR_futimesat 261 -#define __NR_newfstatat 262 -#define __NR_unlinkat 263 -#define __NR_renameat 264 -#define __NR_linkat 265 -#define __NR_symlinkat 266 -#define __NR_readlinkat 267 -#define __NR_fchmodat 268 -#define __NR_faccessat 269 -#define __NR_pselect6 270 -#define __NR_ppoll 271 -#define __NR_unshare 272 -#define __NR_set_robust_list 273 -#define __NR_get_robust_list 274 -#define __NR_splice 275 -#define __NR_tee 276 -#define __NR_sync_file_range 277 -#define __NR_vmsplice 278 -#define __NR_move_pages 279 -#define __NR_utimensat 280 -#define __NR_epoll_pwait 281 -#define __NR_signalfd 282 -#define __NR_timerfd_create 283 -#define __NR_eventfd 284 -#define __NR_fallocate 285 -#define __NR_timerfd_settime 286 -#define __NR_timerfd_gettime 287 -#define __NR_accept4 288 -#define __NR_signalfd4 289 -#define __NR_eventfd2 290 -#define __NR_epoll_create1 291 -#define __NR_dup3 292 -#define __NR_pipe2 293 -#define __NR_inotify_init1 294 -#define __NR_preadv 295 -#define __NR_pwritev 296 -#define __NR_rt_tgsigqueueinfo 297 -#define __NR_perf_event_open 298 -#define __NR_recvmmsg 299 -#define __NR_fanotify_init 300 -#define __NR_fanotify_mark 301 -#define __NR_prlimit64 302 -#define __NR_name_to_handle_at 303 -#define __NR_open_by_handle_at 304 -#define __NR_clock_adjtime 305 -#define __NR_syncfs 306 -#define __NR_sendmmsg 307 -#define __NR_setns 308 -#define __NR_getcpu 309 -#define __NR_process_vm_readv 310 -#define __NR_process_vm_writev 311 -#define __NR_kcmp 312 -#define __NR_finit_module 313 -#define __NR_sched_setattr 314 -#define __NR_sched_getattr 315 -#define __NR_renameat2 316 -#define __NR_seccomp 317 -#define __NR_getrandom 318 -#define __NR_memfd_create 319 -#define __NR_kexec_file_load 320 -#define __NR_bpf 321 -#define __NR_execveat 322 -#define __NR_userfaultfd 323 -#define __NR_membarrier 324 -#define __NR_mlock2 325 -#define __NR_copy_file_range 326 -#define __NR_preadv2 327 -#define __NR_pwritev2 328 -#define __NR_pkey_mprotect 329 -#define __NR_pkey_alloc 330 -#define __NR_pkey_free 331 -#define __NR_statx 332 -#define __NR_io_pgetevents 333 -#define __NR_rseq 334 -#define __NR_pidfd_send_signal 424 -#define __NR_io_uring_setup 425 -#define __NR_io_uring_enter 426 -#define __NR_io_uring_register 427 -#define __NR_open_tree 428 -#define __NR_move_mount 429 -#define __NR_fsopen 430 -#define __NR_fsconfig 431 -#define __NR_fsmount 432 -#define __NR_fspick 433 -#define __NR_pidfd_open 434 -#define __NR_clone3 435 -#define __NR_close_range 436 -#define __NR_openat2 437 -#define __NR_pidfd_getfd 438 -#define __NR_faccessat2 439 -#define __NR_process_madvise 440 -#define __NR_epoll_pwait2 441 -#define __NR_mount_setattr 442 -#define __NR_landlock_create_ruleset 444 -#define __NR_landlock_add_rule 445 -#define __NR_landlock_restrict_self 446 -#define __NR_memfd_secret 447 -#define __NR_process_mrelease 448 -#define __NR_futex_waitv 449 -#define __NR_set_mempolicy_home_node 450 -#define __NR_cachestat 451 -#define __NR_fchmodat2 452 - diff --git a/lib/libc/musl/crt/mipsn32/crtn.s b/lib/libc/musl/crt/mipsn32/crtn.s index dccd7e8901..66f0c7a680 100644 --- a/lib/libc/musl/crt/mipsn32/crtn.s +++ b/lib/libc/musl/crt/mipsn32/crtn.s @@ -2,11 +2,13 @@ .section .init ld $gp, 16($sp) ld $ra, 24($sp) - j $ra + # zig patch: j -> jr for https://github.com/ziglang/zig/issues/21315 + jr $ra addu $sp, $sp, 32 .section .fini ld $gp, 16($sp) ld $ra, 24($sp) - j $ra + # zig patch: j -> jr for https://github.com/ziglang/zig/issues/21315 + jr $ra addu $sp, $sp, 32 diff --git a/lib/libc/musl/include/alltypes.h.in b/lib/libc/musl/include/alltypes.h.in deleted file mode 100644 index d47aeea9aa..0000000000 --- a/lib/libc/musl/include/alltypes.h.in +++ /dev/null @@ -1,95 +0,0 @@ -#define __LITTLE_ENDIAN 1234 -#define __BIG_ENDIAN 4321 -#define __USE_TIME_BITS64 1 - -TYPEDEF unsigned _Addr size_t; -TYPEDEF unsigned _Addr uintptr_t; -TYPEDEF _Addr ptrdiff_t; -TYPEDEF _Addr ssize_t; -TYPEDEF _Addr intptr_t; -TYPEDEF _Addr regoff_t; -TYPEDEF _Reg register_t; -TYPEDEF _Int64 time_t; -TYPEDEF _Int64 suseconds_t; - -TYPEDEF signed char int8_t; -TYPEDEF signed short int16_t; -TYPEDEF signed int int32_t; -TYPEDEF signed _Int64 int64_t; -TYPEDEF signed _Int64 intmax_t; -TYPEDEF unsigned char uint8_t; -TYPEDEF unsigned short uint16_t; -TYPEDEF unsigned int uint32_t; -TYPEDEF unsigned _Int64 uint64_t; -TYPEDEF unsigned _Int64 u_int64_t; -TYPEDEF unsigned _Int64 uintmax_t; - -TYPEDEF unsigned mode_t; -TYPEDEF unsigned _Reg nlink_t; -TYPEDEF _Int64 off_t; -TYPEDEF unsigned _Int64 ino_t; -TYPEDEF unsigned _Int64 dev_t; -TYPEDEF long blksize_t; -TYPEDEF _Int64 blkcnt_t; -TYPEDEF unsigned _Int64 fsblkcnt_t; -TYPEDEF unsigned _Int64 fsfilcnt_t; - -TYPEDEF unsigned wint_t; -TYPEDEF unsigned long wctype_t; - -TYPEDEF void * timer_t; -TYPEDEF int clockid_t; -TYPEDEF long clock_t; -STRUCT timeval { time_t tv_sec; suseconds_t tv_usec; }; -STRUCT timespec { time_t tv_sec; int :8*(sizeof(time_t)-sizeof(long))*(__BYTE_ORDER==4321); long tv_nsec; int :8*(sizeof(time_t)-sizeof(long))*(__BYTE_ORDER!=4321); }; - -TYPEDEF int pid_t; -TYPEDEF unsigned id_t; -TYPEDEF unsigned uid_t; -TYPEDEF unsigned gid_t; -TYPEDEF int key_t; -TYPEDEF unsigned useconds_t; - -#ifdef __cplusplus -TYPEDEF unsigned long pthread_t; -#else -TYPEDEF struct __pthread * pthread_t; -#endif -TYPEDEF int pthread_once_t; -TYPEDEF unsigned pthread_key_t; -TYPEDEF int pthread_spinlock_t; -TYPEDEF struct { unsigned __attr; } pthread_mutexattr_t; -TYPEDEF struct { unsigned __attr; } pthread_condattr_t; -TYPEDEF struct { unsigned __attr; } pthread_barrierattr_t; -TYPEDEF struct { unsigned __attr[2]; } pthread_rwlockattr_t; - -STRUCT _IO_FILE { char __x; }; -TYPEDEF struct _IO_FILE FILE; - -TYPEDEF __builtin_va_list va_list; -TYPEDEF __builtin_va_list __isoc_va_list; - -TYPEDEF struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t; - -TYPEDEF struct __locale_struct * locale_t; - -TYPEDEF struct __sigset_t { unsigned long __bits[128/sizeof(long)]; } sigset_t; - -STRUCT iovec { void *iov_base; size_t iov_len; }; - -STRUCT winsize { unsigned short ws_row, ws_col, ws_xpixel, ws_ypixel; }; - -TYPEDEF unsigned socklen_t; -TYPEDEF unsigned short sa_family_t; - -TYPEDEF struct { union { int __i[sizeof(long)==8?14:9]; volatile int __vi[sizeof(long)==8?14:9]; unsigned long __s[sizeof(long)==8?7:9]; } __u; } pthread_attr_t; -TYPEDEF struct { union { int __i[sizeof(long)==8?10:6]; volatile int __vi[sizeof(long)==8?10:6]; volatile void *volatile __p[sizeof(long)==8?5:6]; } __u; } pthread_mutex_t; -TYPEDEF struct { union { int __i[sizeof(long)==8?10:6]; volatile int __vi[sizeof(long)==8?10:6]; volatile void *volatile __p[sizeof(long)==8?5:6]; } __u; } mtx_t; -TYPEDEF struct { union { int __i[12]; volatile int __vi[12]; void *__p[12*sizeof(int)/sizeof(void*)]; } __u; } pthread_cond_t; -TYPEDEF struct { union { int __i[12]; volatile int __vi[12]; void *__p[12*sizeof(int)/sizeof(void*)]; } __u; } cnd_t; -TYPEDEF struct { union { int __i[sizeof(long)==8?14:8]; volatile int __vi[sizeof(long)==8?14:8]; void *__p[sizeof(long)==8?7:8]; } __u; } pthread_rwlock_t; -TYPEDEF struct { union { int __i[sizeof(long)==8?8:5]; volatile int __vi[sizeof(long)==8?8:5]; void *__p[sizeof(long)==8?4:5]; } __u; } pthread_barrier_t; - -#undef _Addr -#undef _Int64 -#undef _Reg diff --git a/lib/libc/musl/ldso/dlstart.c b/lib/libc/musl/ldso/dlstart.c index 20d50f2cbc..259f5e18ee 100644 --- a/lib/libc/musl/ldso/dlstart.c +++ b/lib/libc/musl/ldso/dlstart.c @@ -140,6 +140,21 @@ hidden void _dlstart_c(size_t *sp, size_t *dynv) size_t *rel_addr = (void *)(base + rel[0]); *rel_addr = base + rel[2]; } + + rel = (void *)(base+dyn[DT_RELR]); + rel_size = dyn[DT_RELRSZ]; + size_t *relr_addr = 0; + for (; rel_size; rel++, rel_size-=sizeof(size_t)) { + if ((rel[0]&1) == 0) { + relr_addr = (void *)(base + rel[0]); + *relr_addr++ += base; + } else { + for (size_t i=0, bitmap=rel[0]; bitmap>>=1; i++) + if (bitmap&1) + relr_addr[i] += base; + relr_addr += 8*sizeof(size_t)-1; + } + } #endif stage2_func dls2; diff --git a/src/musl.zig b/src/musl.zig index d6e29ab6a7..01dcd88743 100644 --- a/src/musl.zig +++ b/src/musl.zig @@ -469,8 +469,6 @@ const src_files = [_][]const u8{ "musl/src/aio/aio.c", "musl/src/aio/aio_suspend.c", "musl/src/aio/lio_listio.c", - "musl/src/complex/__cexp.c", - "musl/src/complex/__cexpf.c", "musl/src/complex/cabs.c", "musl/src/complex/cabsf.c", "musl/src/complex/cabsl.c", @@ -501,7 +499,9 @@ const src_files = [_][]const u8{ "musl/src/complex/ccoshf.c", "musl/src/complex/ccoshl.c", "musl/src/complex/ccosl.c", + "musl/src/complex/__cexp.c", "musl/src/complex/cexp.c", + "musl/src/complex/__cexpf.c", "musl/src/complex/cexpf.c", "musl/src/complex/cexpl.c", "musl/src/complex/cimag.c", @@ -542,8 +542,8 @@ const src_files = [_][]const u8{ "musl/src/conf/legacy.c", "musl/src/conf/pathconf.c", "musl/src/conf/sysconf.c", - "musl/src/crypt/crypt.c", "musl/src/crypt/crypt_blowfish.c", + "musl/src/crypt/crypt.c", "musl/src/crypt/crypt_des.c", "musl/src/crypt/crypt_md5.c", "musl/src/crypt/crypt_r.c", @@ -599,60 +599,60 @@ const src_files = [_][]const u8{ "musl/src/dirent/seekdir.c", "musl/src/dirent/telldir.c", "musl/src/dirent/versionsort.c", + "musl/src/env/clearenv.c", "musl/src/env/__environ.c", + "musl/src/env/getenv.c", "musl/src/env/__init_tls.c", "musl/src/env/__libc_start_main.c", - "musl/src/env/__reset_tls.c", - "musl/src/env/__stack_chk_fail.c", - "musl/src/env/clearenv.c", - "musl/src/env/getenv.c", "musl/src/env/putenv.c", + "musl/src/env/__reset_tls.c", "musl/src/env/secure_getenv.c", "musl/src/env/setenv.c", + "musl/src/env/__stack_chk_fail.c", "musl/src/env/unsetenv.c", "musl/src/errno/__errno_location.c", "musl/src/errno/strerror.c", - "musl/src/exit/_Exit.c", "musl/src/exit/abort.c", "musl/src/exit/abort_lock.c", "musl/src/exit/arm/__aeabi_atexit.c", "musl/src/exit/assert.c", - "musl/src/exit/at_quick_exit.c", "musl/src/exit/atexit.c", + "musl/src/exit/at_quick_exit.c", "musl/src/exit/exit.c", + "musl/src/exit/_Exit.c", "musl/src/exit/quick_exit.c", "musl/src/fcntl/creat.c", "musl/src/fcntl/fcntl.c", - "musl/src/fcntl/open.c", "musl/src/fcntl/openat.c", + "musl/src/fcntl/open.c", "musl/src/fcntl/posix_fadvise.c", "musl/src/fcntl/posix_fallocate.c", - "musl/src/fenv/__flt_rounds.c", "musl/src/fenv/aarch64/fenv.s", - "musl/src/fenv/arm/fenv-hf.S", "musl/src/fenv/arm/fenv.c", + "musl/src/fenv/arm/fenv-hf.S", "musl/src/fenv/fegetexceptflag.c", "musl/src/fenv/feholdexcept.c", "musl/src/fenv/fenv.c", "musl/src/fenv/fesetexceptflag.c", "musl/src/fenv/fesetround.c", "musl/src/fenv/feupdateenv.c", + "musl/src/fenv/__flt_rounds.c", "musl/src/fenv/i386/fenv.s", "musl/src/fenv/loongarch64/fenv.S", "musl/src/fenv/m68k/fenv.c", - "musl/src/fenv/mips/fenv-sf.c", - "musl/src/fenv/mips/fenv.S", - "musl/src/fenv/mips64/fenv-sf.c", "musl/src/fenv/mips64/fenv.S", - "musl/src/fenv/mipsn32/fenv-sf.c", + "musl/src/fenv/mips64/fenv-sf.c", + "musl/src/fenv/mips/fenv.S", + "musl/src/fenv/mips/fenv-sf.c", "musl/src/fenv/mipsn32/fenv.S", - "musl/src/fenv/powerpc/fenv-sf.c", - "musl/src/fenv/powerpc/fenv.S", + "musl/src/fenv/mipsn32/fenv-sf.c", "musl/src/fenv/powerpc64/fenv.c", - "musl/src/fenv/riscv32/fenv-sf.c", + "musl/src/fenv/powerpc/fenv.S", + "musl/src/fenv/powerpc/fenv-sf.c", "musl/src/fenv/riscv32/fenv.S", - "musl/src/fenv/riscv64/fenv-sf.c", + "musl/src/fenv/riscv32/fenv-sf.c", "musl/src/fenv/riscv64/fenv.S", + "musl/src/fenv/riscv64/fenv-sf.c", "musl/src/fenv/s390x/fenv.c", "musl/src/fenv/sh/fenv-nofpu.c", "musl/src/fenv/sh/fenv.S", @@ -665,8 +665,8 @@ const src_files = [_][]const u8{ "musl/src/internal/intscan.c", "musl/src/internal/libc.c", "musl/src/internal/procfdname.c", - "musl/src/internal/sh/__shcall.c", "musl/src/internal/shgetc.c", + "musl/src/internal/sh/__shcall.c", "musl/src/internal/syscall_ret.c", "musl/src/internal/vdso.c", "musl/src/internal/version.c", @@ -683,19 +683,19 @@ const src_files = [_][]const u8{ "musl/src/ipc/shmctl.c", "musl/src/ipc/shmdt.c", "musl/src/ipc/shmget.c", - "musl/src/ldso/__dlsym.c", "musl/src/ldso/aarch64/dlsym.s", "musl/src/ldso/aarch64/tlsdesc.s", "musl/src/ldso/arm/dlsym.s", "musl/src/ldso/arm/dlsym_time64.S", "musl/src/ldso/arm/find_exidx.c", "musl/src/ldso/arm/tlsdesc.S", - "musl/src/ldso/dl_iterate_phdr.c", "musl/src/ldso/dladdr.c", "musl/src/ldso/dlclose.c", "musl/src/ldso/dlerror.c", "musl/src/ldso/dlinfo.c", + "musl/src/ldso/dl_iterate_phdr.c", "musl/src/ldso/dlopen.c", + "musl/src/ldso/__dlsym.c", "musl/src/ldso/dlsym.c", "musl/src/ldso/i386/dlsym.s", "musl/src/ldso/i386/dlsym_time64.S", @@ -705,16 +705,16 @@ const src_files = [_][]const u8{ "musl/src/ldso/m68k/dlsym_time64.S", "musl/src/ldso/microblaze/dlsym.s", "musl/src/ldso/microblaze/dlsym_time64.S", + "musl/src/ldso/mips64/dlsym.s", "musl/src/ldso/mips/dlsym.s", "musl/src/ldso/mips/dlsym_time64.S", - "musl/src/ldso/mips64/dlsym.s", "musl/src/ldso/mipsn32/dlsym.s", "musl/src/ldso/mipsn32/dlsym_time64.S", "musl/src/ldso/or1k/dlsym.s", "musl/src/ldso/or1k/dlsym_time64.S", + "musl/src/ldso/powerpc64/dlsym.s", "musl/src/ldso/powerpc/dlsym.s", "musl/src/ldso/powerpc/dlsym_time64.S", - "musl/src/ldso/powerpc64/dlsym.s", "musl/src/ldso/riscv32/dlsym.s", "musl/src/ldso/riscv64/dlsym.s", "musl/src/ldso/riscv64/tlsdesc.s", @@ -808,21 +808,21 @@ const src_files = [_][]const u8{ "musl/src/linux/wait4.c", "musl/src/linux/x32/sysinfo.c", "musl/src/linux/xattr.c", - "musl/src/locale/__lctrans.c", - "musl/src/locale/__mo_lookup.c", "musl/src/locale/bind_textdomain_codeset.c", - "musl/src/locale/c_locale.c", "musl/src/locale/catclose.c", "musl/src/locale/catgets.c", "musl/src/locale/catopen.c", + "musl/src/locale/c_locale.c", "musl/src/locale/dcngettext.c", "musl/src/locale/duplocale.c", "musl/src/locale/freelocale.c", "musl/src/locale/iconv.c", "musl/src/locale/iconv_close.c", "musl/src/locale/langinfo.c", - "musl/src/locale/locale_map.c", + "musl/src/locale/__lctrans.c", "musl/src/locale/localeconv.c", + "musl/src/locale/locale_map.c", + "musl/src/locale/__mo_lookup.c", "musl/src/locale/newlocale.c", "musl/src/locale/pleval.c", "musl/src/locale/setlocale.c", @@ -849,43 +849,9 @@ const src_files = [_][]const u8{ "musl/src/malloc/oldmalloc/malloc.c", "musl/src/malloc/oldmalloc/malloc_usable_size.c", "musl/src/malloc/posix_memalign.c", - "musl/src/malloc/realloc.c", "musl/src/malloc/reallocarray.c", + "musl/src/malloc/realloc.c", "musl/src/malloc/replaced.c", - "musl/src/math/__cos.c", - "musl/src/math/__cosdf.c", - "musl/src/math/__cosl.c", - "musl/src/math/__expo2.c", - "musl/src/math/__expo2f.c", - "musl/src/math/__fpclassify.c", - "musl/src/math/__fpclassifyf.c", - "musl/src/math/__fpclassifyl.c", - "musl/src/math/__invtrigl.c", - "musl/src/math/__math_divzero.c", - "musl/src/math/__math_divzerof.c", - "musl/src/math/__math_invalid.c", - "musl/src/math/__math_invalidf.c", - "musl/src/math/__math_invalidl.c", - "musl/src/math/__math_oflow.c", - "musl/src/math/__math_oflowf.c", - "musl/src/math/__math_uflow.c", - "musl/src/math/__math_uflowf.c", - "musl/src/math/__math_xflow.c", - "musl/src/math/__math_xflowf.c", - "musl/src/math/__polevll.c", - "musl/src/math/__rem_pio2.c", - "musl/src/math/__rem_pio2_large.c", - "musl/src/math/__rem_pio2f.c", - "musl/src/math/__rem_pio2l.c", - "musl/src/math/__signbit.c", - "musl/src/math/__signbitf.c", - "musl/src/math/__signbitl.c", - "musl/src/math/__sin.c", - "musl/src/math/__sindf.c", - "musl/src/math/__sinl.c", - "musl/src/math/__tan.c", - "musl/src/math/__tandf.c", - "musl/src/math/__tanl.c", "musl/src/math/aarch64/ceil.c", "musl/src/math/aarch64/ceilf.c", "musl/src/math/aarch64/fabs.c", @@ -934,10 +900,10 @@ const src_files = [_][]const u8{ "musl/src/math/asinhf.c", "musl/src/math/asinhl.c", "musl/src/math/asinl.c", - "musl/src/math/atan.c", "musl/src/math/atan2.c", "musl/src/math/atan2f.c", "musl/src/math/atan2l.c", + "musl/src/math/atan.c", "musl/src/math/atanf.c", "musl/src/math/atanh.c", "musl/src/math/atanhf.c", @@ -952,16 +918,18 @@ const src_files = [_][]const u8{ "musl/src/math/copysign.c", "musl/src/math/copysignf.c", "musl/src/math/copysignl.c", + "musl/src/math/__cos.c", "musl/src/math/cos.c", + "musl/src/math/__cosdf.c", "musl/src/math/cosf.c", "musl/src/math/cosh.c", "musl/src/math/coshf.c", "musl/src/math/coshl.c", + "musl/src/math/__cosl.c", "musl/src/math/cosl.c", "musl/src/math/erf.c", "musl/src/math/erff.c", "musl/src/math/erfl.c", - "musl/src/math/exp.c", "musl/src/math/exp10.c", "musl/src/math/exp10f.c", "musl/src/math/exp10l.c", @@ -969,12 +937,15 @@ const src_files = [_][]const u8{ "musl/src/math/exp2f.c", "musl/src/math/exp2f_data.c", "musl/src/math/exp2l.c", + "musl/src/math/exp.c", "musl/src/math/exp_data.c", "musl/src/math/expf.c", "musl/src/math/expl.c", "musl/src/math/expm1.c", "musl/src/math/expm1f.c", "musl/src/math/expm1l.c", + "musl/src/math/__expo2.c", + "musl/src/math/__expo2f.c", "musl/src/math/fabs.c", "musl/src/math/fabsf.c", "musl/src/math/fabsl.c", @@ -998,28 +969,30 @@ const src_files = [_][]const u8{ "musl/src/math/fmod.c", "musl/src/math/fmodf.c", "musl/src/math/fmodl.c", + "musl/src/math/__fpclassify.c", + "musl/src/math/__fpclassifyf.c", + "musl/src/math/__fpclassifyl.c", "musl/src/math/frexp.c", "musl/src/math/frexpf.c", "musl/src/math/frexpl.c", "musl/src/math/hypot.c", "musl/src/math/hypotf.c", "musl/src/math/hypotl.c", - "musl/src/math/i386/__invtrigl.s", - "musl/src/math/i386/acos.s", "musl/src/math/i386/acosf.s", "musl/src/math/i386/acosl.s", - "musl/src/math/i386/asin.s", + "musl/src/math/i386/acos.s", "musl/src/math/i386/asinf.s", "musl/src/math/i386/asinl.s", - "musl/src/math/i386/atan.s", - "musl/src/math/i386/atan2.s", + "musl/src/math/i386/asin.s", "musl/src/math/i386/atan2f.s", "musl/src/math/i386/atan2l.s", + "musl/src/math/i386/atan2.s", "musl/src/math/i386/atanf.s", "musl/src/math/i386/atanl.s", - "musl/src/math/i386/ceil.s", + "musl/src/math/i386/atan.s", "musl/src/math/i386/ceilf.s", "musl/src/math/i386/ceill.s", + "musl/src/math/i386/ceil.s", "musl/src/math/i386/exp2l.s", "musl/src/math/i386/exp_ld.s", "musl/src/math/i386/expl.s", @@ -1027,59 +1000,61 @@ const src_files = [_][]const u8{ "musl/src/math/i386/fabs.c", "musl/src/math/i386/fabsf.c", "musl/src/math/i386/fabsl.c", - "musl/src/math/i386/floor.s", "musl/src/math/i386/floorf.s", "musl/src/math/i386/floorl.s", + "musl/src/math/i386/floor.s", "musl/src/math/i386/fmod.c", "musl/src/math/i386/fmodf.c", "musl/src/math/i386/fmodl.c", - "musl/src/math/i386/hypot.s", "musl/src/math/i386/hypotf.s", - "musl/src/math/i386/ldexp.s", + "musl/src/math/i386/hypot.s", + "musl/src/math/i386/__invtrigl.s", "musl/src/math/i386/ldexpf.s", "musl/src/math/i386/ldexpl.s", + "musl/src/math/i386/ldexp.s", "musl/src/math/i386/llrint.c", "musl/src/math/i386/llrintf.c", "musl/src/math/i386/llrintl.c", - "musl/src/math/i386/log.s", - "musl/src/math/i386/log10.s", "musl/src/math/i386/log10f.s", "musl/src/math/i386/log10l.s", - "musl/src/math/i386/log1p.s", + "musl/src/math/i386/log10.s", "musl/src/math/i386/log1pf.s", "musl/src/math/i386/log1pl.s", - "musl/src/math/i386/log2.s", + "musl/src/math/i386/log1p.s", "musl/src/math/i386/log2f.s", "musl/src/math/i386/log2l.s", + "musl/src/math/i386/log2.s", "musl/src/math/i386/logf.s", "musl/src/math/i386/logl.s", + "musl/src/math/i386/log.s", "musl/src/math/i386/lrint.c", "musl/src/math/i386/lrintf.c", "musl/src/math/i386/lrintl.c", "musl/src/math/i386/remainder.c", "musl/src/math/i386/remainderf.c", "musl/src/math/i386/remainderl.c", - "musl/src/math/i386/remquo.s", "musl/src/math/i386/remquof.s", "musl/src/math/i386/remquol.s", + "musl/src/math/i386/remquo.s", "musl/src/math/i386/rint.c", "musl/src/math/i386/rintf.c", "musl/src/math/i386/rintl.c", - "musl/src/math/i386/scalbln.s", "musl/src/math/i386/scalblnf.s", "musl/src/math/i386/scalblnl.s", - "musl/src/math/i386/scalbn.s", + "musl/src/math/i386/scalbln.s", "musl/src/math/i386/scalbnf.s", "musl/src/math/i386/scalbnl.s", + "musl/src/math/i386/scalbn.s", "musl/src/math/i386/sqrt.c", "musl/src/math/i386/sqrtf.c", "musl/src/math/i386/sqrtl.c", - "musl/src/math/i386/trunc.s", "musl/src/math/i386/truncf.s", "musl/src/math/i386/truncl.s", + "musl/src/math/i386/trunc.s", "musl/src/math/ilogb.c", "musl/src/math/ilogbf.c", "musl/src/math/ilogbl.c", + "musl/src/math/__invtrigl.c", "musl/src/math/j0.c", "musl/src/math/j0f.c", "musl/src/math/j1.c", @@ -1090,17 +1065,16 @@ const src_files = [_][]const u8{ "musl/src/math/ldexpf.c", "musl/src/math/ldexpl.c", "musl/src/math/lgamma.c", - "musl/src/math/lgamma_r.c", "musl/src/math/lgammaf.c", "musl/src/math/lgammaf_r.c", "musl/src/math/lgammal.c", + "musl/src/math/lgamma_r.c", "musl/src/math/llrint.c", "musl/src/math/llrintf.c", "musl/src/math/llrintl.c", "musl/src/math/llround.c", "musl/src/math/llroundf.c", "musl/src/math/llroundl.c", - "musl/src/math/log.c", "musl/src/math/log10.c", "musl/src/math/log10f.c", "musl/src/math/log10l.c", @@ -1112,10 +1086,11 @@ const src_files = [_][]const u8{ "musl/src/math/log2f.c", "musl/src/math/log2f_data.c", "musl/src/math/log2l.c", - "musl/src/math/log_data.c", "musl/src/math/logb.c", "musl/src/math/logbf.c", "musl/src/math/logbl.c", + "musl/src/math/log.c", + "musl/src/math/log_data.c", "musl/src/math/logf.c", "musl/src/math/logf_data.c", "musl/src/math/logl.c", @@ -1126,6 +1101,17 @@ const src_files = [_][]const u8{ "musl/src/math/lroundf.c", "musl/src/math/lroundl.c", "musl/src/math/m68k/sqrtl.c", + "musl/src/math/__math_divzero.c", + "musl/src/math/__math_divzerof.c", + "musl/src/math/__math_invalid.c", + "musl/src/math/__math_invalidf.c", + "musl/src/math/__math_invalidl.c", + "musl/src/math/__math_oflow.c", + "musl/src/math/__math_oflowf.c", + "musl/src/math/__math_uflow.c", + "musl/src/math/__math_uflowf.c", + "musl/src/math/__math_xflow.c", + "musl/src/math/__math_xflowf.c", "musl/src/math/mips/fabs.c", "musl/src/math/mips/fabsf.c", "musl/src/math/mips/sqrt.c", @@ -1145,14 +1131,9 @@ const src_files = [_][]const u8{ "musl/src/math/nexttoward.c", "musl/src/math/nexttowardf.c", "musl/src/math/nexttowardl.c", + "musl/src/math/__polevll.c", "musl/src/math/pow.c", "musl/src/math/pow_data.c", - "musl/src/math/powerpc/fabs.c", - "musl/src/math/powerpc/fabsf.c", - "musl/src/math/powerpc/fma.c", - "musl/src/math/powerpc/fmaf.c", - "musl/src/math/powerpc/sqrt.c", - "musl/src/math/powerpc/sqrtf.c", "musl/src/math/powerpc64/ceil.c", "musl/src/math/powerpc64/ceilf.c", "musl/src/math/powerpc64/fabs.c", @@ -1175,12 +1156,22 @@ const src_files = [_][]const u8{ "musl/src/math/powerpc64/sqrtf.c", "musl/src/math/powerpc64/trunc.c", "musl/src/math/powerpc64/truncf.c", + "musl/src/math/powerpc/fabs.c", + "musl/src/math/powerpc/fabsf.c", + "musl/src/math/powerpc/fma.c", + "musl/src/math/powerpc/fmaf.c", + "musl/src/math/powerpc/sqrt.c", + "musl/src/math/powerpc/sqrtf.c", "musl/src/math/powf.c", "musl/src/math/powf_data.c", "musl/src/math/powl.c", "musl/src/math/remainder.c", "musl/src/math/remainderf.c", "musl/src/math/remainderl.c", + "musl/src/math/__rem_pio2.c", + "musl/src/math/__rem_pio2f.c", + "musl/src/math/__rem_pio2_large.c", + "musl/src/math/__rem_pio2l.c", "musl/src/math/remquo.c", "musl/src/math/remquof.c", "musl/src/math/remquol.c", @@ -1248,27 +1239,36 @@ const src_files = [_][]const u8{ "musl/src/math/scalbn.c", "musl/src/math/scalbnf.c", "musl/src/math/scalbnl.c", + "musl/src/math/__signbit.c", + "musl/src/math/__signbitf.c", + "musl/src/math/__signbitl.c", "musl/src/math/signgam.c", "musl/src/math/significand.c", "musl/src/math/significandf.c", + "musl/src/math/__sin.c", "musl/src/math/sin.c", "musl/src/math/sincos.c", "musl/src/math/sincosf.c", "musl/src/math/sincosl.c", + "musl/src/math/__sindf.c", "musl/src/math/sinf.c", "musl/src/math/sinh.c", "musl/src/math/sinhf.c", "musl/src/math/sinhl.c", + "musl/src/math/__sinl.c", "musl/src/math/sinl.c", "musl/src/math/sqrt.c", "musl/src/math/sqrt_data.c", "musl/src/math/sqrtf.c", "musl/src/math/sqrtl.c", + "musl/src/math/__tan.c", "musl/src/math/tan.c", + "musl/src/math/__tandf.c", "musl/src/math/tanf.c", "musl/src/math/tanh.c", "musl/src/math/tanhf.c", "musl/src/math/tanhl.c", + "musl/src/math/__tanl.c", "musl/src/math/tanl.c", "musl/src/math/tgamma.c", "musl/src/math/tgammaf.c", @@ -1276,7 +1276,6 @@ const src_files = [_][]const u8{ "musl/src/math/trunc.c", "musl/src/math/truncf.c", "musl/src/math/truncl.c", - "musl/src/math/x32/__invtrigl.s", "musl/src/math/x32/acosl.s", "musl/src/math/x32/asinl.s", "musl/src/math/x32/atan2l.s", @@ -1285,30 +1284,30 @@ const src_files = [_][]const u8{ "musl/src/math/x32/exp2l.s", "musl/src/math/x32/expl.s", "musl/src/math/x32/expm1l.s", - "musl/src/math/x32/fabs.s", "musl/src/math/x32/fabsf.s", "musl/src/math/x32/fabsl.s", + "musl/src/math/x32/fabs.s", "musl/src/math/x32/floorl.s", "musl/src/math/x32/fma.c", "musl/src/math/x32/fmaf.c", "musl/src/math/x32/fmodl.s", - "musl/src/math/x32/llrint.s", + "musl/src/math/x32/__invtrigl.s", "musl/src/math/x32/llrintf.s", "musl/src/math/x32/llrintl.s", + "musl/src/math/x32/llrint.s", "musl/src/math/x32/log10l.s", "musl/src/math/x32/log1pl.s", "musl/src/math/x32/log2l.s", "musl/src/math/x32/logl.s", - "musl/src/math/x32/lrint.s", "musl/src/math/x32/lrintf.s", "musl/src/math/x32/lrintl.s", + "musl/src/math/x32/lrint.s", "musl/src/math/x32/remainderl.s", "musl/src/math/x32/rintl.s", - "musl/src/math/x32/sqrt.s", "musl/src/math/x32/sqrtf.s", "musl/src/math/x32/sqrtl.s", + "musl/src/math/x32/sqrt.s", "musl/src/math/x32/truncl.s", - "musl/src/math/x86_64/__invtrigl.s", "musl/src/math/x86_64/acosl.s", "musl/src/math/x86_64/asinl.s", "musl/src/math/x86_64/atan2l.s", @@ -1324,6 +1323,7 @@ const src_files = [_][]const u8{ "musl/src/math/x86_64/fma.c", "musl/src/math/x86_64/fmaf.c", "musl/src/math/x86_64/fmodl.c", + "musl/src/math/x86_64/__invtrigl.s", "musl/src/math/x86_64/llrint.c", "musl/src/math/x86_64/llrintf.c", "musl/src/math/x86_64/llrintl.c", @@ -1349,8 +1349,8 @@ const src_files = [_][]const u8{ "musl/src/misc/ffsll.c", "musl/src/misc/fmtmsg.c", "musl/src/misc/forkpty.c", - "musl/src/misc/get_current_dir_name.c", "musl/src/misc/getauxval.c", + "musl/src/misc/get_current_dir_name.c", "musl/src/misc/getdomainname.c", "musl/src/misc/getentropy.c", "musl/src/misc/gethostid.c", @@ -1382,14 +1382,14 @@ const src_files = [_][]const u8{ "musl/src/misc/wordexp.c", "musl/src/mman/madvise.c", "musl/src/mman/mincore.c", - "musl/src/mman/mlock.c", "musl/src/mman/mlockall.c", + "musl/src/mman/mlock.c", "musl/src/mman/mmap.c", "musl/src/mman/mprotect.c", "musl/src/mman/mremap.c", "musl/src/mman/msync.c", - "musl/src/mman/munlock.c", "musl/src/mman/munlockall.c", + "musl/src/mman/munlock.c", "musl/src/mman/munmap.c", "musl/src/mman/posix_madvise.c", "musl/src/mman/shm_open.c", @@ -1423,8 +1423,8 @@ const src_files = [_][]const u8{ "musl/src/multibyte/wcstombs.c", "musl/src/multibyte/wctob.c", "musl/src/multibyte/wctomb.c", - "musl/src/network/accept.c", "musl/src/network/accept4.c", + "musl/src/network/accept.c", "musl/src/network/bind.c", "musl/src/network/connect.c", "musl/src/network/dn_comp.c", @@ -1438,9 +1438,9 @@ const src_files = [_][]const u8{ "musl/src/network/getaddrinfo.c", "musl/src/network/gethostbyaddr.c", "musl/src/network/gethostbyaddr_r.c", - "musl/src/network/gethostbyname.c", "musl/src/network/gethostbyname2.c", "musl/src/network/gethostbyname2_r.c", + "musl/src/network/gethostbyname.c", "musl/src/network/gethostbyname_r.c", "musl/src/network/getifaddrs.c", "musl/src/network/getnameinfo.c", @@ -1485,11 +1485,11 @@ const src_files = [_][]const u8{ "musl/src/network/res_init.c", "musl/src/network/res_mkquery.c", "musl/src/network/res_msend.c", + "musl/src/network/resolvconf.c", "musl/src/network/res_query.c", "musl/src/network/res_querydomain.c", "musl/src/network/res_send.c", "musl/src/network/res_state.c", - "musl/src/network/resolvconf.c", "musl/src/network/send.c", "musl/src/network/sendmmsg.c", "musl/src/network/sendmsg.c", @@ -1504,14 +1504,14 @@ const src_files = [_][]const u8{ "musl/src/passwd/fgetpwent.c", "musl/src/passwd/fgetspent.c", "musl/src/passwd/getgr_a.c", - "musl/src/passwd/getgr_r.c", - "musl/src/passwd/getgrent.c", "musl/src/passwd/getgrent_a.c", + "musl/src/passwd/getgrent.c", "musl/src/passwd/getgrouplist.c", + "musl/src/passwd/getgr_r.c", "musl/src/passwd/getpw_a.c", - "musl/src/passwd/getpw_r.c", - "musl/src/passwd/getpwent.c", "musl/src/passwd/getpwent_a.c", + "musl/src/passwd/getpwent.c", + "musl/src/passwd/getpw_r.c", "musl/src/passwd/getspent.c", "musl/src/passwd/getspnam.c", "musl/src/passwd/getspnam_r.c", @@ -1520,18 +1520,17 @@ const src_files = [_][]const u8{ "musl/src/passwd/putgrent.c", "musl/src/passwd/putpwent.c", "musl/src/passwd/putspent.c", - "musl/src/prng/__rand48_step.c", - "musl/src/prng/__seed48.c", "musl/src/prng/drand48.c", "musl/src/prng/lcong48.c", "musl/src/prng/lrand48.c", "musl/src/prng/mrand48.c", + "musl/src/prng/__rand48_step.c", "musl/src/prng/rand.c", - "musl/src/prng/rand_r.c", "musl/src/prng/random.c", + "musl/src/prng/rand_r.c", + "musl/src/prng/__seed48.c", "musl/src/prng/seed48.c", "musl/src/prng/srand48.c", - "musl/src/process/_Fork.c", "musl/src/process/aarch64/vfork.s", "musl/src/process/arm/vfork.s", "musl/src/process/execl.c", @@ -1542,15 +1541,8 @@ const src_files = [_][]const u8{ "musl/src/process/execvp.c", "musl/src/process/fexecve.c", "musl/src/process/fork.c", + "musl/src/process/_Fork.c", "musl/src/process/i386/vfork.s", - "musl/src/process/posix_spawn.c", - "musl/src/process/posix_spawn_file_actions_addchdir.c", - "musl/src/process/posix_spawn_file_actions_addclose.c", - "musl/src/process/posix_spawn_file_actions_adddup2.c", - "musl/src/process/posix_spawn_file_actions_addfchdir.c", - "musl/src/process/posix_spawn_file_actions_addopen.c", - "musl/src/process/posix_spawn_file_actions_destroy.c", - "musl/src/process/posix_spawn_file_actions_init.c", "musl/src/process/posix_spawnattr_destroy.c", "musl/src/process/posix_spawnattr_getflags.c", "musl/src/process/posix_spawnattr_getpgroup.c", @@ -1562,6 +1554,14 @@ const src_files = [_][]const u8{ "musl/src/process/posix_spawnattr_setpgroup.c", "musl/src/process/posix_spawnattr_setsigdefault.c", "musl/src/process/posix_spawnattr_setsigmask.c", + "musl/src/process/posix_spawn.c", + "musl/src/process/posix_spawn_file_actions_addchdir.c", + "musl/src/process/posix_spawn_file_actions_addclose.c", + "musl/src/process/posix_spawn_file_actions_adddup2.c", + "musl/src/process/posix_spawn_file_actions_addfchdir.c", + "musl/src/process/posix_spawn_file_actions_addopen.c", + "musl/src/process/posix_spawn_file_actions_destroy.c", + "musl/src/process/posix_spawn_file_actions_init.c", "musl/src/process/posix_spawnp.c", "musl/src/process/riscv64/vfork.s", "musl/src/process/s390x/vfork.s", @@ -1581,9 +1581,9 @@ const src_files = [_][]const u8{ "musl/src/regex/tre-mem.c", "musl/src/sched/affinity.c", "musl/src/sched/sched_cpucount.c", - "musl/src/sched/sched_get_priority_max.c", "musl/src/sched/sched_getcpu.c", "musl/src/sched/sched_getparam.c", + "musl/src/sched/sched_get_priority_max.c", "musl/src/sched/sched_getscheduler.c", "musl/src/sched/sched_rr_get_interval.c", "musl/src/sched/sched_setparam.c", @@ -1614,18 +1614,18 @@ const src_files = [_][]const u8{ "musl/src/setjmp/m68k/setjmp.s", "musl/src/setjmp/microblaze/longjmp.s", "musl/src/setjmp/microblaze/setjmp.s", - "musl/src/setjmp/mips/longjmp.S", - "musl/src/setjmp/mips/setjmp.S", "musl/src/setjmp/mips64/longjmp.S", "musl/src/setjmp/mips64/setjmp.S", + "musl/src/setjmp/mips/longjmp.S", "musl/src/setjmp/mipsn32/longjmp.S", "musl/src/setjmp/mipsn32/setjmp.S", + "musl/src/setjmp/mips/setjmp.S", "musl/src/setjmp/or1k/longjmp.s", "musl/src/setjmp/or1k/setjmp.s", - "musl/src/setjmp/powerpc/longjmp.S", - "musl/src/setjmp/powerpc/setjmp.S", "musl/src/setjmp/powerpc64/longjmp.s", "musl/src/setjmp/powerpc64/setjmp.s", + "musl/src/setjmp/powerpc/longjmp.S", + "musl/src/setjmp/powerpc/setjmp.S", "musl/src/setjmp/riscv32/longjmp.S", "musl/src/setjmp/riscv32/setjmp.S", "musl/src/setjmp/riscv64/longjmp.S", @@ -1654,14 +1654,14 @@ const src_files = [_][]const u8{ "musl/src/signal/m68k/sigsetjmp.s", "musl/src/signal/microblaze/restore.s", "musl/src/signal/microblaze/sigsetjmp.s", - "musl/src/signal/mips/sigsetjmp.s", "musl/src/signal/mips64/sigsetjmp.s", "musl/src/signal/mipsn32/sigsetjmp.s", + "musl/src/signal/mips/sigsetjmp.s", "musl/src/signal/or1k/sigsetjmp.s", - "musl/src/signal/powerpc/restore.s", - "musl/src/signal/powerpc/sigsetjmp.s", "musl/src/signal/powerpc64/restore.s", "musl/src/signal/powerpc64/sigsetjmp.s", + "musl/src/signal/powerpc/restore.s", + "musl/src/signal/powerpc/sigsetjmp.s", "musl/src/signal/psiginfo.c", "musl/src/signal/psignal.c", "musl/src/signal/raise.c", @@ -1710,47 +1710,34 @@ const src_files = [_][]const u8{ "musl/src/signal/x32/sigsetjmp.s", "musl/src/signal/x86_64/restore.s", "musl/src/signal/x86_64/sigsetjmp.s", - "musl/src/stat/__xstat.c", "musl/src/stat/chmod.c", - "musl/src/stat/fchmod.c", "musl/src/stat/fchmodat.c", - "musl/src/stat/fstat.c", + "musl/src/stat/fchmod.c", "musl/src/stat/fstatat.c", + "musl/src/stat/fstat.c", "musl/src/stat/futimens.c", "musl/src/stat/futimesat.c", "musl/src/stat/lchmod.c", "musl/src/stat/lstat.c", - "musl/src/stat/mkdir.c", "musl/src/stat/mkdirat.c", - "musl/src/stat/mkfifo.c", + "musl/src/stat/mkdir.c", "musl/src/stat/mkfifoat.c", - "musl/src/stat/mknod.c", + "musl/src/stat/mkfifo.c", "musl/src/stat/mknodat.c", + "musl/src/stat/mknod.c", "musl/src/stat/stat.c", "musl/src/stat/statvfs.c", "musl/src/stat/umask.c", "musl/src/stat/utimensat.c", - "musl/src/stdio/__fclose_ca.c", - "musl/src/stdio/__fdopen.c", - "musl/src/stdio/__fmodeflags.c", - "musl/src/stdio/__fopen_rb_ca.c", - "musl/src/stdio/__lockfile.c", - "musl/src/stdio/__overflow.c", - "musl/src/stdio/__stdio_close.c", - "musl/src/stdio/__stdio_exit.c", - "musl/src/stdio/__stdio_read.c", - "musl/src/stdio/__stdio_seek.c", - "musl/src/stdio/__stdio_write.c", - "musl/src/stdio/__stdout_write.c", - "musl/src/stdio/__toread.c", - "musl/src/stdio/__towrite.c", - "musl/src/stdio/__uflow.c", + "musl/src/stat/__xstat.c", "musl/src/stdio/asprintf.c", "musl/src/stdio/clearerr.c", "musl/src/stdio/dprintf.c", - "musl/src/stdio/ext.c", "musl/src/stdio/ext2.c", + "musl/src/stdio/ext.c", "musl/src/stdio/fclose.c", + "musl/src/stdio/__fclose_ca.c", + "musl/src/stdio/__fdopen.c", "musl/src/stdio/feof.c", "musl/src/stdio/ferror.c", "musl/src/stdio/fflush.c", @@ -1763,8 +1750,10 @@ const src_files = [_][]const u8{ "musl/src/stdio/fileno.c", "musl/src/stdio/flockfile.c", "musl/src/stdio/fmemopen.c", + "musl/src/stdio/__fmodeflags.c", "musl/src/stdio/fopen.c", "musl/src/stdio/fopencookie.c", + "musl/src/stdio/__fopen_rb_ca.c", "musl/src/stdio/fprintf.c", "musl/src/stdio/fputc.c", "musl/src/stdio/fputs.c", @@ -1783,27 +1772,29 @@ const src_files = [_][]const u8{ "musl/src/stdio/fwrite.c", "musl/src/stdio/fwscanf.c", "musl/src/stdio/getc.c", - "musl/src/stdio/getc_unlocked.c", "musl/src/stdio/getchar.c", "musl/src/stdio/getchar_unlocked.c", + "musl/src/stdio/getc_unlocked.c", "musl/src/stdio/getdelim.c", "musl/src/stdio/getline.c", "musl/src/stdio/gets.c", "musl/src/stdio/getw.c", "musl/src/stdio/getwc.c", "musl/src/stdio/getwchar.c", - "musl/src/stdio/ofl.c", + "musl/src/stdio/__lockfile.c", "musl/src/stdio/ofl_add.c", + "musl/src/stdio/ofl.c", "musl/src/stdio/open_memstream.c", "musl/src/stdio/open_wmemstream.c", + "musl/src/stdio/__overflow.c", "musl/src/stdio/pclose.c", "musl/src/stdio/perror.c", "musl/src/stdio/popen.c", "musl/src/stdio/printf.c", "musl/src/stdio/putc.c", - "musl/src/stdio/putc_unlocked.c", "musl/src/stdio/putchar.c", "musl/src/stdio/putchar_unlocked.c", + "musl/src/stdio/putc_unlocked.c", "musl/src/stdio/puts.c", "musl/src/stdio/putw.c", "musl/src/stdio/putwc.c", @@ -1821,12 +1812,21 @@ const src_files = [_][]const u8{ "musl/src/stdio/sscanf.c", "musl/src/stdio/stderr.c", "musl/src/stdio/stdin.c", + "musl/src/stdio/__stdio_close.c", + "musl/src/stdio/__stdio_exit.c", + "musl/src/stdio/__stdio_read.c", + "musl/src/stdio/__stdio_seek.c", + "musl/src/stdio/__stdio_write.c", "musl/src/stdio/stdout.c", + "musl/src/stdio/__stdout_write.c", "musl/src/stdio/swprintf.c", "musl/src/stdio/swscanf.c", "musl/src/stdio/tempnam.c", "musl/src/stdio/tmpfile.c", "musl/src/stdio/tmpnam.c", + "musl/src/stdio/__toread.c", + "musl/src/stdio/__towrite.c", + "musl/src/stdio/__uflow.c", "musl/src/stdio/ungetc.c", "musl/src/stdio/ungetwc.c", "musl/src/stdio/vasprintf.c", @@ -1953,13 +1953,13 @@ const src_files = [_][]const u8{ "musl/src/string/x86_64/memcpy.s", "musl/src/string/x86_64/memmove.s", "musl/src/string/x86_64/memset.s", - "musl/src/temp/__randname.c", "musl/src/temp/mkdtemp.c", "musl/src/temp/mkostemp.c", "musl/src/temp/mkostemps.c", "musl/src/temp/mkstemp.c", "musl/src/temp/mkstemps.c", "musl/src/temp/mktemp.c", + "musl/src/temp/__randname.c", "musl/src/termios/cfgetospeed.c", "musl/src/termios/cfmakeraw.c", "musl/src/termios/cfsetospeed.c", @@ -1972,23 +1972,16 @@ const src_files = [_][]const u8{ "musl/src/termios/tcsendbreak.c", "musl/src/termios/tcsetattr.c", "musl/src/termios/tcsetwinsize.c", - "musl/src/thread/__lock.c", - "musl/src/thread/__set_thread_area.c", - "musl/src/thread/__syscall_cp.c", - "musl/src/thread/__timedwait.c", - "musl/src/thread/__tls_get_addr.c", - "musl/src/thread/__unmapself.c", - "musl/src/thread/__wait.c", - "musl/src/thread/aarch64/__set_thread_area.s", - "musl/src/thread/aarch64/__unmapself.s", "musl/src/thread/aarch64/clone.s", + "musl/src/thread/aarch64/__set_thread_area.s", "musl/src/thread/aarch64/syscall_cp.s", + "musl/src/thread/aarch64/__unmapself.s", "musl/src/thread/arm/__aeabi_read_tp.s", - "musl/src/thread/arm/__set_thread_area.c", - "musl/src/thread/arm/__unmapself.s", "musl/src/thread/arm/atomics.s", "musl/src/thread/arm/clone.s", + "musl/src/thread/arm/__set_thread_area.c", "musl/src/thread/arm/syscall_cp.s", + "musl/src/thread/arm/__unmapself.s", "musl/src/thread/call_once.c", "musl/src/thread/clone.c", "musl/src/thread/cnd_broadcast.c", @@ -1998,50 +1991,51 @@ const src_files = [_][]const u8{ "musl/src/thread/cnd_timedwait.c", "musl/src/thread/cnd_wait.c", "musl/src/thread/default_attr.c", - "musl/src/thread/i386/__set_thread_area.s", - "musl/src/thread/i386/__unmapself.s", "musl/src/thread/i386/clone.s", + "musl/src/thread/i386/__set_thread_area.s", "musl/src/thread/i386/syscall_cp.s", "musl/src/thread/i386/tls.s", + "musl/src/thread/i386/__unmapself.s", + "musl/src/thread/__lock.c", "musl/src/thread/lock_ptc.c", - "musl/src/thread/loongarch64/__set_thread_area.s", - "musl/src/thread/loongarch64/__unmapself.s", "musl/src/thread/loongarch64/clone.s", + "musl/src/thread/loongarch64/__set_thread_area.s", "musl/src/thread/loongarch64/syscall_cp.s", - "musl/src/thread/m68k/__m68k_read_tp.s", + "musl/src/thread/loongarch64/__unmapself.s", "musl/src/thread/m68k/clone.s", + "musl/src/thread/m68k/__m68k_read_tp.s", "musl/src/thread/m68k/syscall_cp.s", - "musl/src/thread/microblaze/__set_thread_area.s", - "musl/src/thread/microblaze/__unmapself.s", "musl/src/thread/microblaze/clone.s", + "musl/src/thread/microblaze/__set_thread_area.s", "musl/src/thread/microblaze/syscall_cp.s", - "musl/src/thread/mips/__unmapself.s", - "musl/src/thread/mips/clone.s", - "musl/src/thread/mips/syscall_cp.s", - "musl/src/thread/mips64/__unmapself.s", + "musl/src/thread/microblaze/__unmapself.s", "musl/src/thread/mips64/clone.s", "musl/src/thread/mips64/syscall_cp.s", - "musl/src/thread/mipsn32/__unmapself.s", + "musl/src/thread/mips64/__unmapself.s", + "musl/src/thread/mips/clone.s", "musl/src/thread/mipsn32/clone.s", "musl/src/thread/mipsn32/syscall_cp.s", + "musl/src/thread/mipsn32/__unmapself.s", + "musl/src/thread/mips/syscall_cp.s", + "musl/src/thread/mips/__unmapself.s", "musl/src/thread/mtx_destroy.c", "musl/src/thread/mtx_init.c", "musl/src/thread/mtx_lock.c", "musl/src/thread/mtx_timedlock.c", "musl/src/thread/mtx_trylock.c", "musl/src/thread/mtx_unlock.c", - "musl/src/thread/or1k/__set_thread_area.s", - "musl/src/thread/or1k/__unmapself.s", "musl/src/thread/or1k/clone.s", + "musl/src/thread/or1k/__set_thread_area.s", "musl/src/thread/or1k/syscall_cp.s", - "musl/src/thread/powerpc/__set_thread_area.s", - "musl/src/thread/powerpc/__unmapself.s", - "musl/src/thread/powerpc/clone.s", - "musl/src/thread/powerpc/syscall_cp.s", - "musl/src/thread/powerpc64/__set_thread_area.s", - "musl/src/thread/powerpc64/__unmapself.s", + "musl/src/thread/or1k/__unmapself.s", "musl/src/thread/powerpc64/clone.s", + "musl/src/thread/powerpc64/__set_thread_area.s", "musl/src/thread/powerpc64/syscall_cp.s", + "musl/src/thread/powerpc64/__unmapself.s", + "musl/src/thread/powerpc/clone.s", + "musl/src/thread/powerpc/__set_thread_area.s", + "musl/src/thread/powerpc/syscall_cp.s", + "musl/src/thread/powerpc/__unmapself.s", "musl/src/thread/pthread_atfork.c", "musl/src/thread/pthread_attr_destroy.c", "musl/src/thread/pthread_attr_get.c", @@ -2054,24 +2048,24 @@ const src_files = [_][]const u8{ "musl/src/thread/pthread_attr_setscope.c", "musl/src/thread/pthread_attr_setstack.c", "musl/src/thread/pthread_attr_setstacksize.c", - "musl/src/thread/pthread_barrier_destroy.c", - "musl/src/thread/pthread_barrier_init.c", - "musl/src/thread/pthread_barrier_wait.c", "musl/src/thread/pthread_barrierattr_destroy.c", "musl/src/thread/pthread_barrierattr_init.c", "musl/src/thread/pthread_barrierattr_setpshared.c", + "musl/src/thread/pthread_barrier_destroy.c", + "musl/src/thread/pthread_barrier_init.c", + "musl/src/thread/pthread_barrier_wait.c", "musl/src/thread/pthread_cancel.c", "musl/src/thread/pthread_cleanup_push.c", + "musl/src/thread/pthread_condattr_destroy.c", + "musl/src/thread/pthread_condattr_init.c", + "musl/src/thread/pthread_condattr_setclock.c", + "musl/src/thread/pthread_condattr_setpshared.c", "musl/src/thread/pthread_cond_broadcast.c", "musl/src/thread/pthread_cond_destroy.c", "musl/src/thread/pthread_cond_init.c", "musl/src/thread/pthread_cond_signal.c", "musl/src/thread/pthread_cond_timedwait.c", "musl/src/thread/pthread_cond_wait.c", - "musl/src/thread/pthread_condattr_destroy.c", - "musl/src/thread/pthread_condattr_init.c", - "musl/src/thread/pthread_condattr_setclock.c", - "musl/src/thread/pthread_condattr_setpshared.c", "musl/src/thread/pthread_create.c", "musl/src/thread/pthread_detach.c", "musl/src/thread/pthread_equal.c", @@ -2084,6 +2078,12 @@ const src_files = [_][]const u8{ "musl/src/thread/pthread_join.c", "musl/src/thread/pthread_key_create.c", "musl/src/thread/pthread_kill.c", + "musl/src/thread/pthread_mutexattr_destroy.c", + "musl/src/thread/pthread_mutexattr_init.c", + "musl/src/thread/pthread_mutexattr_setprotocol.c", + "musl/src/thread/pthread_mutexattr_setpshared.c", + "musl/src/thread/pthread_mutexattr_setrobust.c", + "musl/src/thread/pthread_mutexattr_settype.c", "musl/src/thread/pthread_mutex_consistent.c", "musl/src/thread/pthread_mutex_destroy.c", "musl/src/thread/pthread_mutex_getprioceiling.c", @@ -2093,13 +2093,10 @@ const src_files = [_][]const u8{ "musl/src/thread/pthread_mutex_timedlock.c", "musl/src/thread/pthread_mutex_trylock.c", "musl/src/thread/pthread_mutex_unlock.c", - "musl/src/thread/pthread_mutexattr_destroy.c", - "musl/src/thread/pthread_mutexattr_init.c", - "musl/src/thread/pthread_mutexattr_setprotocol.c", - "musl/src/thread/pthread_mutexattr_setpshared.c", - "musl/src/thread/pthread_mutexattr_setrobust.c", - "musl/src/thread/pthread_mutexattr_settype.c", "musl/src/thread/pthread_once.c", + "musl/src/thread/pthread_rwlockattr_destroy.c", + "musl/src/thread/pthread_rwlockattr_init.c", + "musl/src/thread/pthread_rwlockattr_setpshared.c", "musl/src/thread/pthread_rwlock_destroy.c", "musl/src/thread/pthread_rwlock_init.c", "musl/src/thread/pthread_rwlock_rdlock.c", @@ -2109,9 +2106,6 @@ const src_files = [_][]const u8{ "musl/src/thread/pthread_rwlock_trywrlock.c", "musl/src/thread/pthread_rwlock_unlock.c", "musl/src/thread/pthread_rwlock_wrlock.c", - "musl/src/thread/pthread_rwlockattr_destroy.c", - "musl/src/thread/pthread_rwlockattr_init.c", - "musl/src/thread/pthread_rwlockattr_setpshared.c", "musl/src/thread/pthread_self.c", "musl/src/thread/pthread_setattr_default_np.c", "musl/src/thread/pthread_setcancelstate.c", @@ -2128,19 +2122,19 @@ const src_files = [_][]const u8{ "musl/src/thread/pthread_spin_trylock.c", "musl/src/thread/pthread_spin_unlock.c", "musl/src/thread/pthread_testcancel.c", - "musl/src/thread/riscv32/__set_thread_area.s", - "musl/src/thread/riscv32/__unmapself.s", "musl/src/thread/riscv32/clone.s", + "musl/src/thread/riscv32/__set_thread_area.s", "musl/src/thread/riscv32/syscall_cp.s", - "musl/src/thread/riscv64/__set_thread_area.s", - "musl/src/thread/riscv64/__unmapself.s", + "musl/src/thread/riscv32/__unmapself.s", "musl/src/thread/riscv64/clone.s", + "musl/src/thread/riscv64/__set_thread_area.s", "musl/src/thread/riscv64/syscall_cp.s", + "musl/src/thread/riscv64/__unmapself.s", + "musl/src/thread/s390x/clone.s", "musl/src/thread/s390x/__set_thread_area.s", + "musl/src/thread/s390x/syscall_cp.s", "musl/src/thread/s390x/__tls_get_offset.s", "musl/src/thread/s390x/__unmapself.s", - "musl/src/thread/s390x/clone.s", - "musl/src/thread/s390x/syscall_cp.s", "musl/src/thread/sem_destroy.c", "musl/src/thread/sem_getvalue.c", "musl/src/thread/sem_init.c", @@ -2150,38 +2144,38 @@ const src_files = [_][]const u8{ "musl/src/thread/sem_trywait.c", "musl/src/thread/sem_unlink.c", "musl/src/thread/sem_wait.c", - "musl/src/thread/sh/__set_thread_area.c", - "musl/src/thread/sh/__unmapself.c", - "musl/src/thread/sh/__unmapself_mmu.s", + "musl/src/thread/__set_thread_area.c", "musl/src/thread/sh/atomics.s", "musl/src/thread/sh/clone.s", + "musl/src/thread/sh/__set_thread_area.c", "musl/src/thread/sh/syscall_cp.s", + "musl/src/thread/sh/__unmapself.c", + "musl/src/thread/sh/__unmapself_mmu.s", "musl/src/thread/synccall.c", + "musl/src/thread/__syscall_cp.c", "musl/src/thread/syscall_cp.c", "musl/src/thread/thrd_create.c", "musl/src/thread/thrd_exit.c", "musl/src/thread/thrd_join.c", "musl/src/thread/thrd_sleep.c", "musl/src/thread/thrd_yield.c", + "musl/src/thread/__timedwait.c", "musl/src/thread/tls.c", + "musl/src/thread/__tls_get_addr.c", "musl/src/thread/tss_create.c", "musl/src/thread/tss_delete.c", "musl/src/thread/tss_set.c", + "musl/src/thread/__unmapself.c", "musl/src/thread/vmlock.c", - "musl/src/thread/x32/__set_thread_area.s", - "musl/src/thread/x32/__unmapself.s", + "musl/src/thread/__wait.c", "musl/src/thread/x32/clone.s", + "musl/src/thread/x32/__set_thread_area.s", "musl/src/thread/x32/syscall_cp.s", - "musl/src/thread/x86_64/__set_thread_area.s", - "musl/src/thread/x86_64/__unmapself.s", + "musl/src/thread/x32/__unmapself.s", "musl/src/thread/x86_64/clone.s", + "musl/src/thread/x86_64/__set_thread_area.s", "musl/src/thread/x86_64/syscall_cp.s", - "musl/src/time/__map_file.c", - "musl/src/time/__month_to_secs.c", - "musl/src/time/__secs_to_tm.c", - "musl/src/time/__tm_to_secs.c", - "musl/src/time/__tz.c", - "musl/src/time/__year_to_secs.c", + "musl/src/thread/x86_64/__unmapself.s", "musl/src/time/asctime.c", "musl/src/time/asctime_r.c", "musl/src/time/clock.c", @@ -2200,8 +2194,11 @@ const src_files = [_][]const u8{ "musl/src/time/gmtime_r.c", "musl/src/time/localtime.c", "musl/src/time/localtime_r.c", + "musl/src/time/__map_file.c", "musl/src/time/mktime.c", + "musl/src/time/__month_to_secs.c", "musl/src/time/nanosleep.c", + "musl/src/time/__secs_to_tm.c", "musl/src/time/strftime.c", "musl/src/time/strptime.c", "musl/src/time/time.c", @@ -2213,9 +2210,11 @@ const src_files = [_][]const u8{ "musl/src/time/timer_settime.c", "musl/src/time/times.c", "musl/src/time/timespec_get.c", + "musl/src/time/__tm_to_secs.c", + "musl/src/time/__tz.c", "musl/src/time/utime.c", "musl/src/time/wcsftime.c", - "musl/src/unistd/_exit.c", + "musl/src/time/__year_to_secs.c", "musl/src/unistd/access.c", "musl/src/unistd/acct.c", "musl/src/unistd/alarm.c", @@ -2223,13 +2222,14 @@ const src_files = [_][]const u8{ "musl/src/unistd/chown.c", "musl/src/unistd/close.c", "musl/src/unistd/ctermid.c", - "musl/src/unistd/dup.c", "musl/src/unistd/dup2.c", "musl/src/unistd/dup3.c", + "musl/src/unistd/dup.c", + "musl/src/unistd/_exit.c", "musl/src/unistd/faccessat.c", "musl/src/unistd/fchdir.c", - "musl/src/unistd/fchown.c", "musl/src/unistd/fchownat.c", + "musl/src/unistd/fchown.c", "musl/src/unistd/fdatasync.c", "musl/src/unistd/fsync.c", "musl/src/unistd/ftruncate.c", @@ -2249,25 +2249,25 @@ const src_files = [_][]const u8{ "musl/src/unistd/getuid.c", "musl/src/unistd/isatty.c", "musl/src/unistd/lchown.c", - "musl/src/unistd/link.c", "musl/src/unistd/linkat.c", + "musl/src/unistd/link.c", "musl/src/unistd/lseek.c", - "musl/src/unistd/mips/pipe.s", "musl/src/unistd/mips64/pipe.s", "musl/src/unistd/mipsn32/lseek.c", "musl/src/unistd/mipsn32/pipe.s", + "musl/src/unistd/mips/pipe.s", "musl/src/unistd/nice.c", "musl/src/unistd/pause.c", - "musl/src/unistd/pipe.c", "musl/src/unistd/pipe2.c", + "musl/src/unistd/pipe.c", "musl/src/unistd/posix_close.c", "musl/src/unistd/pread.c", "musl/src/unistd/preadv.c", "musl/src/unistd/pwrite.c", "musl/src/unistd/pwritev.c", "musl/src/unistd/read.c", - "musl/src/unistd/readlink.c", "musl/src/unistd/readlinkat.c", + "musl/src/unistd/readlink.c", "musl/src/unistd/readv.c", "musl/src/unistd/renameat.c", "musl/src/unistd/rmdir.c", @@ -2285,8 +2285,8 @@ const src_files = [_][]const u8{ "musl/src/unistd/setxid.c", "musl/src/unistd/sh/pipe.s", "musl/src/unistd/sleep.c", - "musl/src/unistd/symlink.c", "musl/src/unistd/symlinkat.c", + "musl/src/unistd/symlink.c", "musl/src/unistd/sync.c", "musl/src/unistd/tcgetpgrp.c", "musl/src/unistd/tcsetpgrp.c", @@ -2294,8 +2294,8 @@ const src_files = [_][]const u8{ "musl/src/unistd/ttyname.c", "musl/src/unistd/ttyname_r.c", "musl/src/unistd/ualarm.c", - "musl/src/unistd/unlink.c", "musl/src/unistd/unlinkat.c", + "musl/src/unistd/unlink.c", "musl/src/unistd/usleep.c", "musl/src/unistd/write.c", "musl/src/unistd/writev.c", @@ -2303,7 +2303,6 @@ const src_files = [_][]const u8{ }; const compat_time32_files = [_][]const u8{ - "musl/compat/time32/__xstat.c", "musl/compat/time32/adjtime32.c", "musl/compat/time32/adjtimex_time32.c", "musl/compat/time32/aio_suspend_time32.c", @@ -2316,12 +2315,12 @@ const compat_time32_files = [_][]const u8{ "musl/compat/time32/ctime32.c", "musl/compat/time32/ctime32_r.c", "musl/compat/time32/difftime32.c", - "musl/compat/time32/fstat_time32.c", "musl/compat/time32/fstatat_time32.c", + "musl/compat/time32/fstat_time32.c", "musl/compat/time32/ftime32.c", "musl/compat/time32/futimens_time32.c", - "musl/compat/time32/futimes_time32.c", "musl/compat/time32/futimesat_time32.c", + "musl/compat/time32/futimes_time32.c", "musl/compat/time32/getitimer_time32.c", "musl/compat/time32/getrusage_time32.c", "musl/compat/time32/gettimeofday_time32.c", @@ -2346,8 +2345,8 @@ const compat_time32_files = [_][]const u8{ "musl/compat/time32/recvmmsg_time32.c", "musl/compat/time32/sched_rr_get_interval_time32.c", "musl/compat/time32/select_time32.c", - "musl/compat/time32/sem_timedwait_time32.c", "musl/compat/time32/semtimedop_time32.c", + "musl/compat/time32/sem_timedwait_time32.c", "musl/compat/time32/setitimer_time32.c", "musl/compat/time32/settimeofday_time32.c", "musl/compat/time32/sigtimedwait_time32.c", @@ -2356,14 +2355,15 @@ const compat_time32_files = [_][]const u8{ "musl/compat/time32/thrd_sleep_time32.c", "musl/compat/time32/time32.c", "musl/compat/time32/time32gm.c", - "musl/compat/time32/timer_gettime32.c", - "musl/compat/time32/timer_settime32.c", "musl/compat/time32/timerfd_gettime32.c", "musl/compat/time32/timerfd_settime32.c", + "musl/compat/time32/timer_gettime32.c", + "musl/compat/time32/timer_settime32.c", "musl/compat/time32/timespec_get_time32.c", - "musl/compat/time32/utime_time32.c", "musl/compat/time32/utimensat_time32.c", "musl/compat/time32/utimes_time32.c", + "musl/compat/time32/utime_time32.c", "musl/compat/time32/wait3_time32.c", "musl/compat/time32/wait4_time32.c", + "musl/compat/time32/__xstat.c", }; From 8baf887f4edc07aea8aa028cb1d866a5a5206508 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Wed, 16 Oct 2024 04:45:32 +0200 Subject: [PATCH 09/14] std.zig.target: Add mips64(el)-linux-muslabin32 and x86_64-linux-muslx32. --- lib/std/zig/target.zig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/std/zig/target.zig b/lib/std/zig/target.zig index 60a49a19e7..7ffce4f455 100644 --- a/lib/std/zig/target.zig +++ b/lib/std/zig/target.zig @@ -47,9 +47,11 @@ pub const available_libcs = [_]ArchOsAbi{ .{ .arch = .mips64, .os = .linux, .abi = .gnuabi64 }, .{ .arch = .mips64, .os = .linux, .abi = .gnuabin32 }, .{ .arch = .mips64, .os = .linux, .abi = .musl }, + .{ .arch = .mips64, .os = .linux, .abi = .muslabin32 }, .{ .arch = .mips64el, .os = .linux, .abi = .gnuabi64 }, .{ .arch = .mips64el, .os = .linux, .abi = .gnuabin32 }, .{ .arch = .mips64el, .os = .linux, .abi = .musl }, + .{ .arch = .mips64el, .os = .linux, .abi = .muslabin32 }, .{ .arch = .powerpc, .os = .linux, .abi = .gnueabi }, .{ .arch = .powerpc, .os = .linux, .abi = .gnueabihf }, .{ .arch = .powerpc, .os = .linux, .abi = .musleabi }, @@ -74,6 +76,7 @@ pub const available_libcs = [_]ArchOsAbi{ .{ .arch = .x86_64, .os = .linux, .abi = .gnu }, .{ .arch = .x86_64, .os = .linux, .abi = .gnux32 }, .{ .arch = .x86_64, .os = .linux, .abi = .musl }, + .{ .arch = .x86_64, .os = .linux, .abi = .muslx32 }, .{ .arch = .x86_64, .os = .macos, .abi = .none, .os_ver = .{ .major = 10, .minor = 7, .patch = 0 } }, .{ .arch = .x86_64, .os = .windows, .abi = .gnu }, }; From 11915ae48e44cfd9d4e5c5823919fb24951e68f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Wed, 16 Oct 2024 06:30:16 +0200 Subject: [PATCH 10/14] std.zig.target: Change mips64(el)-linux-musl triples to -muslabi64. With this, MIPS triples for musl are in line with glibc triples. --- lib/std/zig/target.zig | 4 ++-- test/llvm_targets.zig | 2 -- test/tests.zig | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/std/zig/target.zig b/lib/std/zig/target.zig index 7ffce4f455..c72b221936 100644 --- a/lib/std/zig/target.zig +++ b/lib/std/zig/target.zig @@ -46,11 +46,11 @@ pub const available_libcs = [_]ArchOsAbi{ .{ .arch = .mipsel, .os = .linux, .abi = .musleabihf }, .{ .arch = .mips64, .os = .linux, .abi = .gnuabi64 }, .{ .arch = .mips64, .os = .linux, .abi = .gnuabin32 }, - .{ .arch = .mips64, .os = .linux, .abi = .musl }, + .{ .arch = .mips64, .os = .linux, .abi = .muslabi64 }, .{ .arch = .mips64, .os = .linux, .abi = .muslabin32 }, .{ .arch = .mips64el, .os = .linux, .abi = .gnuabi64 }, .{ .arch = .mips64el, .os = .linux, .abi = .gnuabin32 }, - .{ .arch = .mips64el, .os = .linux, .abi = .musl }, + .{ .arch = .mips64el, .os = .linux, .abi = .muslabi64 }, .{ .arch = .mips64el, .os = .linux, .abi = .muslabin32 }, .{ .arch = .powerpc, .os = .linux, .abi = .gnueabi }, .{ .arch = .powerpc, .os = .linux, .abi = .gnueabihf }, diff --git a/test/llvm_targets.zig b/test/llvm_targets.zig index 7cf7d3e8d9..f3de404337 100644 --- a/test/llvm_targets.zig +++ b/test/llvm_targets.zig @@ -160,7 +160,6 @@ const targets = [_]std.Target.Query{ .{ .cpu_arch = .mips64, .os_tag = .freestanding, .abi = .none }, .{ .cpu_arch = .mips64, .os_tag = .linux, .abi = .gnuabi64 }, .{ .cpu_arch = .mips64, .os_tag = .linux, .abi = .gnuabin32 }, - .{ .cpu_arch = .mips64, .os_tag = .linux, .abi = .musl }, .{ .cpu_arch = .mips64, .os_tag = .linux, .abi = .muslabi64 }, .{ .cpu_arch = .mips64, .os_tag = .linux, .abi = .muslabin32 }, .{ .cpu_arch = .mips64, .os_tag = .linux, .abi = .none }, @@ -171,7 +170,6 @@ const targets = [_]std.Target.Query{ .{ .cpu_arch = .mips64el, .os_tag = .freestanding, .abi = .none }, .{ .cpu_arch = .mips64el, .os_tag = .linux, .abi = .gnuabi64 }, .{ .cpu_arch = .mips64el, .os_tag = .linux, .abi = .gnuabin32 }, - .{ .cpu_arch = .mips64el, .os_tag = .linux, .abi = .musl }, .{ .cpu_arch = .mips64el, .os_tag = .linux, .abi = .muslabi64 }, .{ .cpu_arch = .mips64el, .os_tag = .linux, .abi = .muslabin32 }, .{ .cpu_arch = .mips64el, .os_tag = .linux, .abi = .none }, diff --git a/test/tests.zig b/test/tests.zig index a9035560b3..8bcb31a7c8 100644 --- a/test/tests.zig +++ b/test/tests.zig @@ -454,7 +454,7 @@ const test_targets = blk: { .target = .{ .cpu_arch = .mips64, .os_tag = .linux, - .abi = .musl, + .abi = .muslabi64, }, .link_libc = true, }, @@ -478,7 +478,7 @@ const test_targets = blk: { .target = .{ .cpu_arch = .mips64el, .os_tag = .linux, - .abi = .musl, + .abi = .muslabi64, }, .link_libc = true, }, From 50cae505f74d0d8507129b5ea5cc52b2b21b3f8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Wed, 16 Oct 2024 05:42:02 +0200 Subject: [PATCH 11/14] glibc: Fix an LP_SIZE redefinition warning for gnux32. --- lib/libc/glibc/sysdeps/x86_64/x32/sysdep.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libc/glibc/sysdeps/x86_64/x32/sysdep.h b/lib/libc/glibc/sysdeps/x86_64/x32/sysdep.h index 02036edd7d..39cb08b3cf 100644 --- a/lib/libc/glibc/sysdeps/x86_64/x32/sysdep.h +++ b/lib/libc/glibc/sysdeps/x86_64/x32/sysdep.h @@ -17,6 +17,7 @@ . */ #include +#undef LP_SIZE #ifdef __ASSEMBLER__ # define LP_SIZE 4 #else From 43878f51d94a6c6297053fff37426fa556b1ef9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Wed, 16 Oct 2024 05:43:17 +0200 Subject: [PATCH 12/14] glibc: Emit _IO_stdin_used reference in .rodata. This fixes an X86_64_32 relocation linker error when targeting gnux32. --- src/glibc.zig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/glibc.zig b/src/glibc.zig index a7736a9827..fff050b311 100644 --- a/src/glibc.zig +++ b/src/glibc.zig @@ -1015,7 +1015,7 @@ pub fn buildSharedObjects(comp: *Compilation, prog_node: std.Progress.Node) !voi } } - try stubs_asm.appendSlice(".data\n"); + try stubs_asm.appendSlice(".rodata\n"); // For some targets, the real `libc.so.6` will contain a weak reference to `_IO_stdin_used`, // making the linker put the symbol in the dynamic symbol table. We likewise need to emit a @@ -1046,6 +1046,8 @@ pub fn buildSharedObjects(comp: *Compilation, prog_node: std.Progress.Node) !voi }); } + try stubs_asm.appendSlice(".data\n"); + const obj_inclusions_len = try inc_reader.readInt(u16, .little); sym_i = 0; From d61e4ef8b00f8c66389c5bf614d701cafc23b1ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Wed, 16 Oct 2024 06:07:51 +0200 Subject: [PATCH 13/14] generate_linux_syscalls: Generate syscalls for x32. Also update the syscalls file based on Linux 6.10. No diffs other than x32. --- lib/std/os/linux.zig | 19 +- lib/std/os/linux/syscalls.zig | 366 ++++++++++++++++++++++++++++++ tools/generate_linux_syscalls.zig | 16 ++ 3 files changed, 393 insertions(+), 8 deletions(-) diff --git a/lib/std/os/linux.zig b/lib/std/os/linux.zig index f563264f07..43274671e1 100644 --- a/lib/std/os/linux.zig +++ b/lib/std/os/linux.zig @@ -122,17 +122,11 @@ pub const SECCOMP = @import("linux/seccomp.zig"); pub const syscalls = @import("linux/syscalls.zig"); pub const SYS = switch (@import("builtin").cpu.arch) { - .x86 => syscalls.X86, - .x86_64 => syscalls.X64, - .aarch64, .aarch64_be => syscalls.Arm64, .arc => syscalls.Arc, .arm, .armeb, .thumb, .thumbeb => syscalls.Arm, + .aarch64, .aarch64_be => syscalls.Arm64, .csky => syscalls.CSky, .hexagon => syscalls.Hexagon, - .riscv32 => syscalls.RiscV32, - .riscv64 => syscalls.RiscV64, - .sparc => syscalls.Sparc, - .sparc64 => syscalls.Sparc64, .loongarch64 => syscalls.LoongArch64, .m68k => syscalls.M68k, .mips, .mipsel => syscalls.MipsO32, @@ -140,9 +134,18 @@ pub const SYS = switch (@import("builtin").cpu.arch) { .gnuabin32, .muslabin32 => syscalls.MipsN32, else => syscalls.MipsN64, }, + .riscv32 => syscalls.RiscV32, + .riscv64 => syscalls.RiscV64, + .s390x => syscalls.S390x, + .sparc => syscalls.Sparc, + .sparc64 => syscalls.Sparc64, .powerpc, .powerpcle => syscalls.PowerPC, .powerpc64, .powerpc64le => syscalls.PowerPC64, - .s390x => syscalls.S390x, + .x86 => syscalls.X86, + .x86_64 => switch (builtin.abi) { + .gnux32, .muslx32 => syscalls.X32, + else => syscalls.X64, + }, .xtensa => syscalls.Xtensa, else => @compileError("The Zig Standard Library is missing syscall definitions for the target CPU architecture"), }; diff --git a/lib/std/os/linux/syscalls.zig b/lib/std/os/linux/syscalls.zig index ef04387ea6..fbf3aada02 100644 --- a/lib/std/os/linux/syscalls.zig +++ b/lib/std/os/linux/syscalls.zig @@ -833,6 +833,372 @@ pub const X64 = enum(usize) { mseal = 462, }; +pub const X32 = enum(usize) { + read = 0, + write = 1, + open = 2, + close = 3, + stat = 4, + fstat = 5, + lstat = 6, + poll = 7, + lseek = 8, + mmap = 9, + mprotect = 10, + munmap = 11, + brk = 12, + rt_sigprocmask = 14, + pread64 = 17, + pwrite64 = 18, + access = 21, + pipe = 22, + select = 23, + sched_yield = 24, + mremap = 25, + msync = 26, + mincore = 27, + madvise = 28, + shmget = 29, + shmat = 30, + shmctl = 31, + dup = 32, + dup2 = 33, + pause = 34, + nanosleep = 35, + getitimer = 36, + alarm = 37, + setitimer = 38, + getpid = 39, + sendfile = 40, + socket = 41, + connect = 42, + accept = 43, + sendto = 44, + shutdown = 48, + bind = 49, + listen = 50, + getsockname = 51, + getpeername = 52, + socketpair = 53, + clone = 56, + fork = 57, + vfork = 58, + exit = 60, + wait4 = 61, + kill = 62, + uname = 63, + semget = 64, + semop = 65, + semctl = 66, + shmdt = 67, + msgget = 68, + msgsnd = 69, + msgrcv = 70, + msgctl = 71, + fcntl = 72, + flock = 73, + fsync = 74, + fdatasync = 75, + truncate = 76, + ftruncate = 77, + getdents = 78, + getcwd = 79, + chdir = 80, + fchdir = 81, + rename = 82, + mkdir = 83, + rmdir = 84, + creat = 85, + link = 86, + unlink = 87, + symlink = 88, + readlink = 89, + chmod = 90, + fchmod = 91, + chown = 92, + fchown = 93, + lchown = 94, + umask = 95, + gettimeofday = 96, + getrlimit = 97, + getrusage = 98, + sysinfo = 99, + times = 100, + getuid = 102, + syslog = 103, + getgid = 104, + setuid = 105, + setgid = 106, + geteuid = 107, + getegid = 108, + setpgid = 109, + getppid = 110, + getpgrp = 111, + setsid = 112, + setreuid = 113, + setregid = 114, + getgroups = 115, + setgroups = 116, + setresuid = 117, + getresuid = 118, + setresgid = 119, + getresgid = 120, + getpgid = 121, + setfsuid = 122, + setfsgid = 123, + getsid = 124, + capget = 125, + capset = 126, + rt_sigsuspend = 130, + utime = 132, + mknod = 133, + personality = 135, + ustat = 136, + statfs = 137, + fstatfs = 138, + sysfs = 139, + getpriority = 140, + setpriority = 141, + sched_setparam = 142, + sched_getparam = 143, + sched_setscheduler = 144, + sched_getscheduler = 145, + sched_get_priority_max = 146, + sched_get_priority_min = 147, + sched_rr_get_interval = 148, + mlock = 149, + munlock = 150, + mlockall = 151, + munlockall = 152, + vhangup = 153, + modify_ldt = 154, + pivot_root = 155, + prctl = 157, + arch_prctl = 158, + adjtimex = 159, + setrlimit = 160, + chroot = 161, + sync = 162, + acct = 163, + settimeofday = 164, + mount = 165, + umount2 = 166, + swapon = 167, + swapoff = 168, + reboot = 169, + sethostname = 170, + setdomainname = 171, + iopl = 172, + ioperm = 173, + init_module = 175, + delete_module = 176, + quotactl = 179, + getpmsg = 181, + putpmsg = 182, + afs_syscall = 183, + tuxcall = 184, + security = 185, + gettid = 186, + readahead = 187, + setxattr = 188, + lsetxattr = 189, + fsetxattr = 190, + getxattr = 191, + lgetxattr = 192, + fgetxattr = 193, + listxattr = 194, + llistxattr = 195, + flistxattr = 196, + removexattr = 197, + lremovexattr = 198, + fremovexattr = 199, + tkill = 200, + time = 201, + futex = 202, + sched_setaffinity = 203, + sched_getaffinity = 204, + io_destroy = 207, + io_getevents = 208, + io_cancel = 210, + lookup_dcookie = 212, + epoll_create = 213, + remap_file_pages = 216, + getdents64 = 217, + set_tid_address = 218, + restart_syscall = 219, + semtimedop = 220, + fadvise64 = 221, + timer_settime = 223, + timer_gettime = 224, + timer_getoverrun = 225, + timer_delete = 226, + clock_settime = 227, + clock_gettime = 228, + clock_getres = 229, + clock_nanosleep = 230, + exit_group = 231, + epoll_wait = 232, + epoll_ctl = 233, + tgkill = 234, + utimes = 235, + mbind = 237, + set_mempolicy = 238, + get_mempolicy = 239, + mq_open = 240, + mq_unlink = 241, + mq_timedsend = 242, + mq_timedreceive = 243, + mq_getsetattr = 245, + add_key = 248, + request_key = 249, + keyctl = 250, + ioprio_set = 251, + ioprio_get = 252, + inotify_init = 253, + inotify_add_watch = 254, + inotify_rm_watch = 255, + migrate_pages = 256, + openat = 257, + mkdirat = 258, + mknodat = 259, + fchownat = 260, + futimesat = 261, + fstatat64 = 262, + unlinkat = 263, + renameat = 264, + linkat = 265, + symlinkat = 266, + readlinkat = 267, + fchmodat = 268, + faccessat = 269, + pselect6 = 270, + ppoll = 271, + unshare = 272, + splice = 275, + tee = 276, + sync_file_range = 277, + utimensat = 280, + epoll_pwait = 281, + signalfd = 282, + timerfd_create = 283, + eventfd = 284, + fallocate = 285, + timerfd_settime = 286, + timerfd_gettime = 287, + accept4 = 288, + signalfd4 = 289, + eventfd2 = 290, + epoll_create1 = 291, + dup3 = 292, + pipe2 = 293, + inotify_init1 = 294, + perf_event_open = 298, + fanotify_init = 300, + fanotify_mark = 301, + prlimit64 = 302, + name_to_handle_at = 303, + open_by_handle_at = 304, + clock_adjtime = 305, + syncfs = 306, + setns = 308, + getcpu = 309, + kcmp = 312, + finit_module = 313, + sched_setattr = 314, + sched_getattr = 315, + renameat2 = 316, + seccomp = 317, + getrandom = 318, + memfd_create = 319, + kexec_file_load = 320, + bpf = 321, + userfaultfd = 323, + membarrier = 324, + mlock2 = 325, + copy_file_range = 326, + pkey_mprotect = 329, + pkey_alloc = 330, + pkey_free = 331, + statx = 332, + io_pgetevents = 333, + rseq = 334, + pidfd_send_signal = 424, + io_uring_setup = 425, + io_uring_enter = 426, + io_uring_register = 427, + open_tree = 428, + move_mount = 429, + fsopen = 430, + fsconfig = 431, + fsmount = 432, + fspick = 433, + pidfd_open = 434, + clone3 = 435, + close_range = 436, + openat2 = 437, + pidfd_getfd = 438, + faccessat2 = 439, + process_madvise = 440, + epoll_pwait2 = 441, + mount_setattr = 442, + quotactl_fd = 443, + landlock_create_ruleset = 444, + landlock_add_rule = 445, + landlock_restrict_self = 446, + memfd_secret = 447, + process_mrelease = 448, + futex_waitv = 449, + set_mempolicy_home_node = 450, + cachestat = 451, + fchmodat2 = 452, + map_shadow_stack = 453, + futex_wake = 454, + futex_wait = 455, + futex_requeue = 456, + statmount = 457, + listmount = 458, + lsm_get_self_attr = 459, + lsm_set_self_attr = 460, + lsm_list_modules = 461, + mseal = 462, + rt_sigaction = 512, + rt_sigreturn = 513, + ioctl = 514, + readv = 515, + writev = 516, + recvfrom = 517, + sendmsg = 518, + recvmsg = 519, + execve = 520, + ptrace = 521, + rt_sigpending = 522, + rt_sigtimedwait = 523, + rt_sigqueueinfo = 524, + sigaltstack = 525, + timer_create = 526, + mq_notify = 527, + kexec_load = 528, + waitid = 529, + set_robust_list = 530, + get_robust_list = 531, + vmsplice = 532, + move_pages = 533, + preadv = 534, + pwritev = 535, + rt_tgsigqueueinfo = 536, + recvmmsg = 537, + sendmmsg = 538, + process_vm_readv = 539, + process_vm_writev = 540, + setsockopt = 541, + getsockopt = 542, + io_setup = 543, + io_submit = 544, + execveat = 545, + preadv2 = 546, + pwritev2 = 547, +}; + pub const Arm = enum(usize) { const arm_base = 0x0f0000; diff --git a/tools/generate_linux_syscalls.zig b/tools/generate_linux_syscalls.zig index df1b5127df..38726e6501 100644 --- a/tools/generate_linux_syscalls.zig +++ b/tools/generate_linux_syscalls.zig @@ -162,6 +162,22 @@ const arch_infos = [_]ArchInfo{ .additional_enum = null, }, }, + .{ + .table = .{ + .name = "x32", + .enum_name = "X32", + .file_path = "arch/x86/entry/syscalls/syscall_64.tbl", + .process_file = &processTableBasedArch, + .filters = .{ + .abiCheckParams = .{ .abi = "64", .flow = .@"continue" }, + .fixedName = &fixedName, + .isReservedNameOld = null, + }, + .header = null, + .extra_values = null, + .additional_enum = null, + }, + }, .{ .table = .{ .name = "arm", From a5bc9cbb15f415f3c8bded3b8026c7cf326b7c12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Wed, 16 Oct 2024 06:41:00 +0200 Subject: [PATCH 14/14] llvm: Fix lowering of gnuilp32 ABI to be gnu_ilp32. LLVM doesn't even recognize the gnuilp32 spelling as an alternative. --- lib/compiler/aro/aro/target.zig | 2 +- src/codegen/llvm.zig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/compiler/aro/aro/target.zig b/lib/compiler/aro/aro/target.zig index 5e5a793632..56bc4dd46a 100644 --- a/lib/compiler/aro/aro/target.zig +++ b/lib/compiler/aro/aro/target.zig @@ -693,7 +693,7 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 { .gnuf32 => "gnuf32", .gnusf => "gnusf", .gnux32 => "gnux32", - .gnuilp32 => "gnuilp32", + .gnuilp32 => "gnu_ilp32", .code16 => "code16", .eabi => "eabi", .eabihf => "eabihf", diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig index 0a1073efcf..74c1bb1f5d 100644 --- a/src/codegen/llvm.zig +++ b/src/codegen/llvm.zig @@ -263,7 +263,7 @@ pub fn targetTriple(allocator: Allocator, target: std.Target) ![]const u8 { .gnuf32 => "gnuf32", .gnusf => "gnusf", .gnux32 => "gnux32", - .gnuilp32 => "gnuilp32", + .gnuilp32 => "gnu_ilp32", .code16 => "code16", .eabi => "eabi", .eabihf => "eabihf",