Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linux: Make elf name type constants always available #3938

Merged
merged 1 commit into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions libc-test/semver/linux-gnu.txt
Original file line number Diff line number Diff line change
Expand Up @@ -337,23 +337,6 @@ NFT_USERDATA_MAXLEN
NF_NETDEV_INGRESS
NF_NETDEV_NUMHOOKS
NILFS_SUPER_MAGIC
NT_PRSTATUS
NT_PRFPREG
NT_FPREGSET
NT_PRPSINFO
NT_PRXREG
NT_TASKSTRUCT
NT_PLATFORM
NT_AUXV
NT_GWINDOWS
NT_ASRS
NT_PSTATUS
NT_PSINFO
NT_PRCRED
NT_UTSNAME
NT_LWPSTATUS
NT_LWPSINFO
NT_PRFPXREG
NTF_EXT_LEARNED
NTF_MASTER
NTF_OFFLOADED
Expand Down
17 changes: 17 additions & 0 deletions libc-test/semver/linux.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4008,3 +4008,20 @@ eventfd_write
__c_anonymous_ifru_map
__c_anonymous_ifr_ifru
__c_anonymous_ifc_ifcu
NT_PRSTATUS
NT_PRFPREG
NT_FPREGSET
NT_PRPSINFO
NT_PRXREG
NT_TASKSTRUCT
NT_PLATFORM
NT_AUXV
NT_GWINDOWS
NT_ASRS
NT_PSTATUS
NT_PSINFO
NT_PRCRED
NT_UTSNAME
NT_LWPSTATUS
NT_LWPSINFO
NT_PRFPXREG
19 changes: 0 additions & 19 deletions src/unix/linux_like/linux/gnu/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1094,25 +1094,6 @@ pub const XSK_UNALIGNED_BUF_ADDR_MASK: ::c_ulonglong = (1 << XSK_UNALIGNED_BUF_O

pub const XDP_PKT_CONTD: ::__u32 = 1 << 0;

// elf.h
pub const NT_PRSTATUS: ::c_int = 1;
pub const NT_PRFPREG: ::c_int = 2;
pub const NT_FPREGSET: ::c_int = 2;
pub const NT_PRPSINFO: ::c_int = 3;
pub const NT_PRXREG: ::c_int = 4;
pub const NT_TASKSTRUCT: ::c_int = 4;
pub const NT_PLATFORM: ::c_int = 5;
pub const NT_AUXV: ::c_int = 6;
pub const NT_GWINDOWS: ::c_int = 7;
pub const NT_ASRS: ::c_int = 8;
pub const NT_PSTATUS: ::c_int = 10;
pub const NT_PSINFO: ::c_int = 13;
pub const NT_PRCRED: ::c_int = 14;
pub const NT_UTSNAME: ::c_int = 15;
pub const NT_LWPSTATUS: ::c_int = 16;
pub const NT_LWPSINFO: ::c_int = 17;
pub const NT_PRFPXREG: ::c_int = 20;

pub const ELFOSABI_ARM_AEABI: u8 = 64;

// linux/sched.h
Expand Down
19 changes: 19 additions & 0 deletions src/unix/linux_like/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5133,6 +5133,25 @@ pub const SCHED_FLAG_KEEP_PARAMS: ::c_int = 0x10;
pub const SCHED_FLAG_UTIL_CLAMP_MIN: ::c_int = 0x20;
pub const SCHED_FLAG_UTIL_CLAMP_MAX: ::c_int = 0x40;

// elf.h
pub const NT_PRSTATUS: ::c_int = 1;
pub const NT_PRFPREG: ::c_int = 2;
pub const NT_FPREGSET: ::c_int = 2;
pub const NT_PRPSINFO: ::c_int = 3;
pub const NT_PRXREG: ::c_int = 4;
pub const NT_TASKSTRUCT: ::c_int = 4;
pub const NT_PLATFORM: ::c_int = 5;
pub const NT_AUXV: ::c_int = 6;
pub const NT_GWINDOWS: ::c_int = 7;
pub const NT_ASRS: ::c_int = 8;
pub const NT_PSTATUS: ::c_int = 10;
pub const NT_PSINFO: ::c_int = 13;
pub const NT_PRCRED: ::c_int = 14;
pub const NT_UTSNAME: ::c_int = 15;
pub const NT_LWPSTATUS: ::c_int = 16;
pub const NT_LWPSINFO: ::c_int = 17;
pub const NT_PRFPXREG: ::c_int = 20;

pub const SCHED_FLAG_KEEP_ALL: ::c_int = SCHED_FLAG_KEEP_POLICY | SCHED_FLAG_KEEP_PARAMS;

pub const SCHED_FLAG_UTIL_CLAMP: ::c_int = SCHED_FLAG_UTIL_CLAMP_MIN | SCHED_FLAG_UTIL_CLAMP_MAX;
Expand Down