-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
abi-x32The x32 ABI for 64-bit x86The x32 ABI for 64-bit x86arch-x86_6464-bit x8664-bit x86bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behavioros-linuxLinuxLinuxstandard libraryThis issue involves writing Zig code for the standard library.This issue involves writing Zig code for the standard library.
Milestone
Description
Zig Version
0.15.0-dev.483+837e0f9c3
According to the syscall man page, the x32 ABI requires that the syscall numbers be ORed with __X32_SYSCALL_BIT (which is 0x40000000) to distinguish them from x86_64 syscalls. However, the syscall numbers in the X32 enum in lib/std/os/linux/syscalls.zig are not ORed with __X32_SYSCALL_BIT. As a result, some std.os.linux functions on x32 will make x86_64 syscalls instead, and others will simply fail with ENOSYS.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
abi-x32The x32 ABI for 64-bit x86The x32 ABI for 64-bit x86arch-x86_6464-bit x8664-bit x86bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behavioros-linuxLinuxLinuxstandard libraryThis issue involves writing Zig code for the standard library.This issue involves writing Zig code for the standard library.