LibC: Add sys/auxv.h with getauxval

This commit is contained in:
2026-07-01 12:58:09 +03:00
parent 74e94eedae
commit c0d38862f2
6 changed files with 70 additions and 24 deletions

View File

@@ -149,6 +149,18 @@ __BEGIN_DECLS
#define DT_LOPROC 0x70000000
#define DT_HIPROC 0x7FFFFFFF
#define AT_NULL 0
#define AT_IGNORE 1
#define AT_EXECFD 2
#define AT_PHDR 3
#define AT_PHENT 4
#define AT_PHNUM 5
#define AT_PAGESZ 6
#define AT_BASE 7
#define AT_SHARED_PAGE 0xFFFF0001
#define AT_STACK_BASE 0xFFFF0002
#define AT_STACK_SIZE 0xFFFF0003
#define R_386_NONE 0
#define R_386_32 1
#define R_386_PC32 2

View File

@@ -0,0 +1,14 @@
#ifndef _SYS_AUXV_H
#define _SYS_AUXV_H 1
#include <sys/cdefs.h>
__BEGIN_DECLS
#include <elf.h>
unsigned long getauxval(unsigned long type);
__END_DECLS
#endif