mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-27 19:09:47 +03:00
update bundled musl source to 1.1.23
This commit is contained in:
@@ -26,3 +26,7 @@
|
||||
#define HWCAP_USCAT (1 << 25)
|
||||
#define HWCAP_ILRCPC (1 << 26)
|
||||
#define HWCAP_FLAGM (1 << 27)
|
||||
#define HWCAP_SSBS (1 << 28)
|
||||
#define HWCAP_SB (1 << 29)
|
||||
#define HWCAP_PACA (1 << 30)
|
||||
#define HWCAP_PACG (1UL << 31)
|
||||
|
||||
@@ -275,4 +275,10 @@
|
||||
#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
|
||||
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
#define fp_barrierf fp_barrierf
|
||||
static inline float fp_barrierf(float x)
|
||||
{
|
||||
__asm__ __volatile__ ("" : "+w"(x));
|
||||
return x;
|
||||
}
|
||||
|
||||
#define fp_barrier fp_barrier
|
||||
static inline double fp_barrier(double x)
|
||||
{
|
||||
__asm__ __volatile__ ("" : "+w"(x));
|
||||
return x;
|
||||
}
|
||||
|
||||
#define fp_force_evalf fp_force_evalf
|
||||
static inline void fp_force_evalf(float x)
|
||||
{
|
||||
__asm__ __volatile__ ("" : "+w"(x));
|
||||
}
|
||||
|
||||
#define fp_force_eval fp_force_eval
|
||||
static inline void fp_force_eval(double x)
|
||||
{
|
||||
__asm__ __volatile__ ("" : "+w"(x));
|
||||
}
|
||||
@@ -83,7 +83,7 @@ static inline void a_crash()
|
||||
: : : "memory");
|
||||
}
|
||||
|
||||
#if __ARM_ARCH >= 5
|
||||
#if __ARM_ARCH >= 5 && (!__thumb__ || __thumb2__)
|
||||
|
||||
#define a_clz_32 a_clz_32
|
||||
static inline int a_clz_32(uint32_t x)
|
||||
|
||||
@@ -354,6 +354,33 @@
|
||||
#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 __ARM_NR_breakpoint 0x0f0001
|
||||
#define __ARM_NR_cacheflush 0x0f0002
|
||||
|
||||
@@ -64,6 +64,8 @@
|
||||
#define TIOCGPTLCK 0x80045439
|
||||
#define TIOCGEXCL 0x80045440
|
||||
#define TIOCGPTPEER 0x5441
|
||||
#define TIOCGISO7816 0x80285442
|
||||
#define TIOCSISO7816 0xc0285443
|
||||
|
||||
#define FIONCLEX 0x5450
|
||||
#define FIOCLEX 0x5451
|
||||
@@ -82,24 +84,6 @@
|
||||
#define TIOCGICOUNT 0x545D
|
||||
#define FIOQSIZE 0x5460
|
||||
|
||||
#define TIOCPKT_DATA 0
|
||||
#define TIOCPKT_FLUSHREAD 1
|
||||
#define TIOCPKT_FLUSHWRITE 2
|
||||
#define TIOCPKT_STOP 4
|
||||
#define TIOCPKT_START 8
|
||||
#define TIOCPKT_NOSTOP 16
|
||||
#define TIOCPKT_DOSTOP 32
|
||||
#define TIOCPKT_IOCTL 64
|
||||
|
||||
#define TIOCSER_TEMT 0x01
|
||||
|
||||
struct winsize {
|
||||
unsigned short ws_row;
|
||||
unsigned short ws_col;
|
||||
unsigned short ws_xpixel;
|
||||
unsigned short ws_ypixel;
|
||||
};
|
||||
|
||||
#define TIOCM_LE 0x001
|
||||
#define TIOCM_DTR 0x002
|
||||
#define TIOCM_RTS 0x004
|
||||
@@ -115,23 +99,6 @@ struct winsize {
|
||||
#define TIOCM_OUT2 0x4000
|
||||
#define TIOCM_LOOP 0x8000
|
||||
|
||||
#define N_TTY 0
|
||||
#define N_SLIP 1
|
||||
#define N_MOUSE 2
|
||||
#define N_PPP 3
|
||||
#define N_STRIP 4
|
||||
#define N_AX25 5
|
||||
#define N_X25 6
|
||||
#define N_6PACK 7
|
||||
#define N_MASC 8
|
||||
#define N_R3964 9
|
||||
#define N_PROFIBUS_FDL 10
|
||||
#define N_IRDA 11
|
||||
#define N_SMSBLOCK 12
|
||||
#define N_HDLC 13
|
||||
#define N_SYNC_PPP 14
|
||||
#define N_HCI 15
|
||||
|
||||
#define FIOSETOWN 0x8901
|
||||
#define SIOCSPGRP 0x8902
|
||||
#define FIOGETOWN 0x8903
|
||||
@@ -140,67 +107,4 @@ struct winsize {
|
||||
#define SIOCGSTAMP 0x8906
|
||||
#define SIOCGSTAMPNS 0x8907
|
||||
|
||||
#define SIOCADDRT 0x890B
|
||||
#define SIOCDELRT 0x890C
|
||||
#define SIOCRTMSG 0x890D
|
||||
|
||||
#define SIOCGIFNAME 0x8910
|
||||
#define SIOCSIFLINK 0x8911
|
||||
#define SIOCGIFCONF 0x8912
|
||||
#define SIOCGIFFLAGS 0x8913
|
||||
#define SIOCSIFFLAGS 0x8914
|
||||
#define SIOCGIFADDR 0x8915
|
||||
#define SIOCSIFADDR 0x8916
|
||||
#define SIOCGIFDSTADDR 0x8917
|
||||
#define SIOCSIFDSTADDR 0x8918
|
||||
#define SIOCGIFBRDADDR 0x8919
|
||||
#define SIOCSIFBRDADDR 0x891a
|
||||
#define SIOCGIFNETMASK 0x891b
|
||||
#define SIOCSIFNETMASK 0x891c
|
||||
#define SIOCGIFMETRIC 0x891d
|
||||
#define SIOCSIFMETRIC 0x891e
|
||||
#define SIOCGIFMEM 0x891f
|
||||
#define SIOCSIFMEM 0x8920
|
||||
#define SIOCGIFMTU 0x8921
|
||||
#define SIOCSIFMTU 0x8922
|
||||
#define SIOCSIFNAME 0x8923
|
||||
#define SIOCSIFHWADDR 0x8924
|
||||
#define SIOCGIFENCAP 0x8925
|
||||
#define SIOCSIFENCAP 0x8926
|
||||
#define SIOCGIFHWADDR 0x8927
|
||||
#define SIOCGIFSLAVE 0x8929
|
||||
#define SIOCSIFSLAVE 0x8930
|
||||
#define SIOCADDMULTI 0x8931
|
||||
#define SIOCDELMULTI 0x8932
|
||||
#define SIOCGIFINDEX 0x8933
|
||||
#define SIOGIFINDEX SIOCGIFINDEX
|
||||
#define SIOCSIFPFLAGS 0x8934
|
||||
#define SIOCGIFPFLAGS 0x8935
|
||||
#define SIOCDIFADDR 0x8936
|
||||
#define SIOCSIFHWBROADCAST 0x8937
|
||||
#define SIOCGIFCOUNT 0x8938
|
||||
|
||||
#define SIOCGIFBR 0x8940
|
||||
#define SIOCSIFBR 0x8941
|
||||
|
||||
#define SIOCGIFTXQLEN 0x8942
|
||||
#define SIOCSIFTXQLEN 0x8943
|
||||
|
||||
#define SIOCDARP 0x8953
|
||||
#define SIOCGARP 0x8954
|
||||
#define SIOCSARP 0x8955
|
||||
|
||||
#define SIOCDRARP 0x8960
|
||||
#define SIOCGRARP 0x8961
|
||||
#define SIOCSRARP 0x8962
|
||||
|
||||
#define SIOCGIFMAP 0x8970
|
||||
#define SIOCSIFMAP 0x8971
|
||||
|
||||
#define SIOCADDDLCI 0x8980
|
||||
#define SIOCDELDLCI 0x8981
|
||||
|
||||
#define SIOCDEVPRIVATE 0x89F0
|
||||
#define SIOCPROTOPRIVATE 0x89E0
|
||||
|
||||
#include <bits/ioctl_fix.h>
|
||||
|
||||
@@ -384,4 +384,38 @@
|
||||
#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
|
||||
|
||||
|
||||
@@ -3,52 +3,82 @@
|
||||
((union { long long ll; long l[2]; }){ .ll = x }).l[1]
|
||||
#define __SYSCALL_LL_O(x) __SYSCALL_LL_E((x))
|
||||
|
||||
#if SYSCALL_NO_TLS
|
||||
#define SYSCALL_INSNS "int $128"
|
||||
#else
|
||||
#define SYSCALL_INSNS "call *%%gs:16"
|
||||
#endif
|
||||
|
||||
#define SYSCALL_INSNS_12 "xchg %%ebx,%%edx ; " SYSCALL_INSNS " ; xchg %%ebx,%%edx"
|
||||
#define SYSCALL_INSNS_34 "xchg %%ebx,%%edi ; " SYSCALL_INSNS " ; xchg %%ebx,%%edi"
|
||||
|
||||
static inline long __syscall0(long n)
|
||||
{
|
||||
unsigned long __ret;
|
||||
__asm__ __volatile__ (".hidden __vsyscall ; call __vsyscall" : "=a"(__ret) : "a"(n) : "memory");
|
||||
__asm__ __volatile__ (SYSCALL_INSNS : "=a"(__ret) : "a"(n) : "memory");
|
||||
return __ret;
|
||||
}
|
||||
|
||||
static inline long __syscall1(long n, long a1)
|
||||
{
|
||||
unsigned long __ret;
|
||||
__asm__ __volatile__ (".hidden __vsyscall ; call __vsyscall" : "=a"(__ret) : "a"(n), "d"(a1) : "memory");
|
||||
__asm__ __volatile__ (SYSCALL_INSNS_12 : "=a"(__ret) : "a"(n), "d"(a1) : "memory");
|
||||
return __ret;
|
||||
}
|
||||
|
||||
static inline long __syscall2(long n, long a1, long a2)
|
||||
{
|
||||
unsigned long __ret;
|
||||
__asm__ __volatile__ (".hidden __vsyscall ; call __vsyscall" : "=a"(__ret) : "a"(n), "d"(a1), "c"(a2) : "memory");
|
||||
__asm__ __volatile__ (SYSCALL_INSNS_12 : "=a"(__ret) : "a"(n), "d"(a1), "c"(a2) : "memory");
|
||||
return __ret;
|
||||
}
|
||||
|
||||
static inline long __syscall3(long n, long a1, long a2, long a3)
|
||||
{
|
||||
unsigned long __ret;
|
||||
__asm__ __volatile__ (".hidden __vsyscall ; call __vsyscall" : "=a"(__ret) : "a"(n), "d"(a1), "c"(a2), "D"(a3) : "memory");
|
||||
#if !defined(__PIC__) || !defined(BROKEN_EBX_ASM)
|
||||
__asm__ __volatile__ (SYSCALL_INSNS : "=a"(__ret) : "a"(n), "b"(a1), "c"(a2), "d"(a3) : "memory");
|
||||
#else
|
||||
__asm__ __volatile__ (SYSCALL_INSNS_34 : "=a"(__ret) : "a"(n), "D"(a1), "c"(a2), "d"(a3) : "memory");
|
||||
#endif
|
||||
return __ret;
|
||||
}
|
||||
|
||||
static inline long __syscall4(long n, long a1, long a2, long a3, long a4)
|
||||
{
|
||||
unsigned long __ret;
|
||||
__asm__ __volatile__ (".hidden __vsyscall ; call __vsyscall" : "=a"(__ret) : "a"(n), "d"(a1), "c"(a2), "D"(a3), "S"(a4) : "memory");
|
||||
#if !defined(__PIC__) || !defined(BROKEN_EBX_ASM)
|
||||
__asm__ __volatile__ (SYSCALL_INSNS : "=a"(__ret) : "a"(n), "b"(a1), "c"(a2), "d"(a3), "S"(a4) : "memory");
|
||||
#else
|
||||
__asm__ __volatile__ (SYSCALL_INSNS_34 : "=a"(__ret) : "a"(n), "D"(a1), "c"(a2), "d"(a3), "S"(a4) : "memory");
|
||||
#endif
|
||||
return __ret;
|
||||
}
|
||||
|
||||
static inline long __syscall5(long n, long a1, long a2, long a3, long a4, long a5)
|
||||
{
|
||||
unsigned long __ret;
|
||||
__asm__ __volatile__ ("push %6 ; .hidden __vsyscall ; call __vsyscall ; add $4,%%esp" : "=a"(__ret) : "a"(n), "d"(a1), "c"(a2), "D"(a3), "S"(a4), "g"(a5) : "memory");
|
||||
#if !defined(__PIC__) || !defined(BROKEN_EBX_ASM)
|
||||
__asm__ __volatile__ (SYSCALL_INSNS
|
||||
: "=a"(__ret) : "a"(n), "b"(a1), "c"(a2), "d"(a3), "S"(a4), "D"(a5) : "memory");
|
||||
#else
|
||||
__asm__ __volatile__ ("pushl %2 ; push %%ebx ; mov 4(%%esp),%%ebx ; " SYSCALL_INSNS " ; pop %%ebx ; add $4,%%esp"
|
||||
: "=a"(__ret) : "a"(n), "g"(a1), "c"(a2), "d"(a3), "S"(a4), "D"(a5) : "memory");
|
||||
#endif
|
||||
return __ret;
|
||||
}
|
||||
|
||||
static inline long __syscall6(long n, long a1, long a2, long a3, long a4, long a5, long a6)
|
||||
{
|
||||
unsigned long __ret;
|
||||
__asm__ __volatile__ ("push %6 ; .hidden __vsyscall6 ; call __vsyscall6 ; add $4,%%esp" : "=a"(__ret) : "a"(n), "d"(a1), "c"(a2), "D"(a3), "S"(a4), "g"(0+(long[]){a5, a6}) : "memory");
|
||||
#if !defined(__PIC__) || !defined(BROKEN_EBX_ASM)
|
||||
__asm__ __volatile__ ("pushl %7 ; push %%ebp ; mov 4(%%esp),%%ebp ; " SYSCALL_INSNS " ; pop %%ebp ; add $4,%%esp"
|
||||
: "=a"(__ret) : "a"(n), "b"(a1), "c"(a2), "d"(a3), "S"(a4), "D"(a5), "g"(a6) : "memory");
|
||||
#else
|
||||
unsigned long a1a6[2] = { a1, a6 };
|
||||
__asm__ __volatile__ ("pushl %1 ; push %%ebx ; push %%ebp ; mov 8(%%esp),%%ebx ; mov 4(%%ebx),%%ebp ; mov (%%ebx),%%ebx ; " SYSCALL_INSNS " ; pop %%ebp ; pop %%ebx ; add $4,%%esp"
|
||||
: "=a"(__ret) : "g"(&a1a6), "a"(n), "c"(a2), "d"(a3), "S"(a4), "D"(a5) : "memory");
|
||||
#endif
|
||||
return __ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -90,24 +90,6 @@
|
||||
#define TIOCMIWAIT 0x5491
|
||||
#define TIOCGICOUNT 0x5492
|
||||
|
||||
#define TIOCPKT_DATA 0
|
||||
#define TIOCPKT_FLUSHREAD 1
|
||||
#define TIOCPKT_FLUSHWRITE 2
|
||||
#define TIOCPKT_STOP 4
|
||||
#define TIOCPKT_START 8
|
||||
#define TIOCPKT_NOSTOP 16
|
||||
#define TIOCPKT_DOSTOP 32
|
||||
#define TIOCPKT_IOCTL 64
|
||||
|
||||
#define TIOCSER_TEMT 0x01
|
||||
|
||||
struct winsize {
|
||||
unsigned short ws_row;
|
||||
unsigned short ws_col;
|
||||
unsigned short ws_xpixel;
|
||||
unsigned short ws_ypixel;
|
||||
};
|
||||
|
||||
#define TIOCM_LE 0x001
|
||||
#define TIOCM_DTR 0x002
|
||||
#define TIOCM_RTS 0x004
|
||||
@@ -123,23 +105,6 @@ struct winsize {
|
||||
#define TIOCM_OUT2 0x4000
|
||||
#define TIOCM_LOOP 0x8000
|
||||
|
||||
#define N_TTY 0
|
||||
#define N_SLIP 1
|
||||
#define N_MOUSE 2
|
||||
#define N_PPP 3
|
||||
#define N_STRIP 4
|
||||
#define N_AX25 5
|
||||
#define N_X25 6
|
||||
#define N_6PACK 7
|
||||
#define N_MASC 8
|
||||
#define N_R3964 9
|
||||
#define N_PROFIBUS_FDL 10
|
||||
#define N_IRDA 11
|
||||
#define N_SMSBLOCK 12
|
||||
#define N_HDLC 13
|
||||
#define N_SYNC_PPP 14
|
||||
#define N_HCI 15
|
||||
|
||||
#define FIOGETOWN _IOR('f', 123, int)
|
||||
#define FIOSETOWN _IOW('f', 124, int)
|
||||
#define SIOCATMARK _IOR('s', 7, int)
|
||||
@@ -147,66 +112,3 @@ struct winsize {
|
||||
#define SIOCGPGRP _IOR('s', 9, pid_t)
|
||||
#define SIOCGSTAMP 0x8906
|
||||
#define SIOCGSTAMPNS 0x8907
|
||||
|
||||
#define SIOCADDRT 0x890B
|
||||
#define SIOCDELRT 0x890C
|
||||
#define SIOCRTMSG 0x890D
|
||||
|
||||
#define SIOCGIFNAME 0x8910
|
||||
#define SIOCSIFLINK 0x8911
|
||||
#define SIOCGIFCONF 0x8912
|
||||
#define SIOCGIFFLAGS 0x8913
|
||||
#define SIOCSIFFLAGS 0x8914
|
||||
#define SIOCGIFADDR 0x8915
|
||||
#define SIOCSIFADDR 0x8916
|
||||
#define SIOCGIFDSTADDR 0x8917
|
||||
#define SIOCSIFDSTADDR 0x8918
|
||||
#define SIOCGIFBRDADDR 0x8919
|
||||
#define SIOCSIFBRDADDR 0x891a
|
||||
#define SIOCGIFNETMASK 0x891b
|
||||
#define SIOCSIFNETMASK 0x891c
|
||||
#define SIOCGIFMETRIC 0x891d
|
||||
#define SIOCSIFMETRIC 0x891e
|
||||
#define SIOCGIFMEM 0x891f
|
||||
#define SIOCSIFMEM 0x8920
|
||||
#define SIOCGIFMTU 0x8921
|
||||
#define SIOCSIFMTU 0x8922
|
||||
#define SIOCSIFNAME 0x8923
|
||||
#define SIOCSIFHWADDR 0x8924
|
||||
#define SIOCGIFENCAP 0x8925
|
||||
#define SIOCSIFENCAP 0x8926
|
||||
#define SIOCGIFHWADDR 0x8927
|
||||
#define SIOCGIFSLAVE 0x8929
|
||||
#define SIOCSIFSLAVE 0x8930
|
||||
#define SIOCADDMULTI 0x8931
|
||||
#define SIOCDELMULTI 0x8932
|
||||
#define SIOCGIFINDEX 0x8933
|
||||
#define SIOGIFINDEX SIOCGIFINDEX
|
||||
#define SIOCSIFPFLAGS 0x8934
|
||||
#define SIOCGIFPFLAGS 0x8935
|
||||
#define SIOCDIFADDR 0x8936
|
||||
#define SIOCSIFHWBROADCAST 0x8937
|
||||
#define SIOCGIFCOUNT 0x8938
|
||||
|
||||
#define SIOCGIFBR 0x8940
|
||||
#define SIOCSIFBR 0x8941
|
||||
|
||||
#define SIOCGIFTXQLEN 0x8942
|
||||
#define SIOCSIFTXQLEN 0x8943
|
||||
|
||||
#define SIOCDARP 0x8953
|
||||
#define SIOCGARP 0x8954
|
||||
#define SIOCSARP 0x8955
|
||||
|
||||
#define SIOCDRARP 0x8960
|
||||
#define SIOCGRARP 0x8961
|
||||
#define SIOCSRARP 0x8962
|
||||
|
||||
#define SIOCGIFMAP 0x8970
|
||||
#define SIOCSIFMAP 0x8971
|
||||
|
||||
#define SIOCADDDLCI 0x8980
|
||||
#define SIOCDELDLCI 0x8981
|
||||
|
||||
#define SIOCDEVPRIVATE 0x89F0
|
||||
#define SIOCPROTOPRIVATE 0x89E0
|
||||
|
||||
@@ -366,4 +366,38 @@
|
||||
#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
|
||||
|
||||
|
||||
@@ -165,5 +165,5 @@ struct termios {
|
||||
#define EXTPROC 0200000
|
||||
|
||||
#define XTABS 0014000
|
||||
#define TIOCSER_TEMT 0x01
|
||||
#define TIOCSER_TEMT 1
|
||||
#endif
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
((union { long long ll; long l[2]; }){ .ll = x }).l[1]
|
||||
#define __SYSCALL_LL_O(x) 0, __SYSCALL_LL_E((x))
|
||||
|
||||
hidden long (__syscall)(long, ...);
|
||||
|
||||
#define SYSCALL_RLIM_INFINITY (-1UL/2)
|
||||
|
||||
#if _MIPSEL || __MIPSEL || __MIPSEL__
|
||||
@@ -104,8 +102,22 @@ static inline long __syscall4(long n, long a, long b, long c, long d)
|
||||
|
||||
static inline long __syscall5(long n, long a, long b, long c, long d, long e)
|
||||
{
|
||||
long r2 = (__syscall)(n, a, b, c, d, e);
|
||||
if (r2 > -4096UL) return r2;
|
||||
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__ (
|
||||
"subu $sp,$sp,32 ; sw $8,16($sp) ; "
|
||||
"addu $2,$0,%3 ; syscall ;"
|
||||
"addu $sp,$sp,32"
|
||||
: "=&r"(r2), "=r"(r7), "+r"(r8)
|
||||
: "ir"(n), "0"(r2), "1"(r7), "r"(r4), "r"(r5), "r"(r6)
|
||||
: "$1", "$3", "$9", "$10", "$11", "$12", "$13",
|
||||
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
|
||||
if (r7) return -r2;
|
||||
long ret = r2;
|
||||
if (n == SYS_stat64 || n == SYS_fstat64 || n == SYS_lstat64) __stat_fix(b);
|
||||
if (n == SYS_fstatat64) __stat_fix(c);
|
||||
return r2;
|
||||
@@ -113,8 +125,48 @@ static inline long __syscall5(long n, long a, long b, long c, long d, long e)
|
||||
|
||||
static inline long __syscall6(long n, long a, long b, long c, long d, long e, long f)
|
||||
{
|
||||
long r2 = (__syscall)(n, a, b, c, d, e, f);
|
||||
if (r2 > -4096UL) return r2;
|
||||
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__ (
|
||||
"subu $sp,$sp,32 ; sw $8,16($sp) ; sw $9,20($sp) ; "
|
||||
"addu $2,$0,%4 ; syscall ;"
|
||||
"addu $sp,$sp,32"
|
||||
: "=&r"(r2), "=r"(r7), "+r"(r8), "+r"(r9)
|
||||
: "ir"(n), "0"(r2), "1"(r7), "r"(r4), "r"(r5), "r"(r6)
|
||||
: "$1", "$3", "$10", "$11", "$12", "$13",
|
||||
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
|
||||
if (r7) return -r2;
|
||||
long ret = r2;
|
||||
if (n == SYS_stat64 || n == SYS_fstat64 || n == SYS_lstat64) __stat_fix(b);
|
||||
if (n == SYS_fstatat64) __stat_fix(c);
|
||||
return r2;
|
||||
}
|
||||
|
||||
static inline long __syscall7(long n, long a, long b, long c, long d, long e, long f, long g)
|
||||
{
|
||||
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 r10 __asm__("$10") = g;
|
||||
register long r2 __asm__("$2");
|
||||
__asm__ __volatile__ (
|
||||
"subu $sp,$sp,32 ; sw $8,16($sp) ; sw $9,20($sp) ; sw $10,24($sp) ; "
|
||||
"addu $2,$0,%5 ; syscall ;"
|
||||
"addu $sp,$sp,32"
|
||||
: "=&r"(r2), "=r"(r7), "+r"(r8), "+r"(r9), "+r"(r10)
|
||||
: "ir"(n), "0"(r2), "1"(r7), "r"(r4), "r"(r5), "r"(r6)
|
||||
: "$1", "$3", "$11", "$12", "$13",
|
||||
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
|
||||
if (r7) return -r2;
|
||||
long ret = r2;
|
||||
if (n == SYS_stat64 || n == SYS_fstat64 || n == SYS_lstat64) __stat_fix(b);
|
||||
if (n == SYS_fstatat64) __stat_fix(c);
|
||||
return r2;
|
||||
|
||||
@@ -90,24 +90,6 @@
|
||||
#define TIOCMIWAIT 0x5491
|
||||
#define TIOCGICOUNT 0x5492
|
||||
|
||||
#define TIOCPKT_DATA 0
|
||||
#define TIOCPKT_FLUSHREAD 1
|
||||
#define TIOCPKT_FLUSHWRITE 2
|
||||
#define TIOCPKT_STOP 4
|
||||
#define TIOCPKT_START 8
|
||||
#define TIOCPKT_NOSTOP 16
|
||||
#define TIOCPKT_DOSTOP 32
|
||||
#define TIOCPKT_IOCTL 64
|
||||
|
||||
#define TIOCSER_TEMT 0x01
|
||||
|
||||
struct winsize {
|
||||
unsigned short ws_row;
|
||||
unsigned short ws_col;
|
||||
unsigned short ws_xpixel;
|
||||
unsigned short ws_ypixel;
|
||||
};
|
||||
|
||||
#define TIOCM_LE 0x001
|
||||
#define TIOCM_DTR 0x002
|
||||
#define TIOCM_RTS 0x004
|
||||
@@ -123,23 +105,6 @@ struct winsize {
|
||||
#define TIOCM_OUT2 0x4000
|
||||
#define TIOCM_LOOP 0x8000
|
||||
|
||||
#define N_TTY 0
|
||||
#define N_SLIP 1
|
||||
#define N_MOUSE 2
|
||||
#define N_PPP 3
|
||||
#define N_STRIP 4
|
||||
#define N_AX25 5
|
||||
#define N_X25 6
|
||||
#define N_6PACK 7
|
||||
#define N_MASC 8
|
||||
#define N_R3964 9
|
||||
#define N_PROFIBUS_FDL 10
|
||||
#define N_IRDA 11
|
||||
#define N_SMSBLOCK 12
|
||||
#define N_HDLC 13
|
||||
#define N_SYNC_PPP 14
|
||||
#define N_HCI 15
|
||||
|
||||
#define FIOGETOWN _IOR('f', 123, int)
|
||||
#define FIOSETOWN _IOW('f', 124, int)
|
||||
#define SIOCATMARK _IOR('s', 7, int)
|
||||
@@ -147,66 +112,3 @@ struct winsize {
|
||||
#define SIOCGPGRP _IOR('s', 9, pid_t)
|
||||
#define SIOCGSTAMP 0x8906
|
||||
#define SIOCGSTAMPNS 0x8907
|
||||
|
||||
#define SIOCADDRT 0x890B
|
||||
#define SIOCDELRT 0x890C
|
||||
#define SIOCRTMSG 0x890D
|
||||
|
||||
#define SIOCGIFNAME 0x8910
|
||||
#define SIOCSIFLINK 0x8911
|
||||
#define SIOCGIFCONF 0x8912
|
||||
#define SIOCGIFFLAGS 0x8913
|
||||
#define SIOCSIFFLAGS 0x8914
|
||||
#define SIOCGIFADDR 0x8915
|
||||
#define SIOCSIFADDR 0x8916
|
||||
#define SIOCGIFDSTADDR 0x8917
|
||||
#define SIOCSIFDSTADDR 0x8918
|
||||
#define SIOCGIFBRDADDR 0x8919
|
||||
#define SIOCSIFBRDADDR 0x891a
|
||||
#define SIOCGIFNETMASK 0x891b
|
||||
#define SIOCSIFNETMASK 0x891c
|
||||
#define SIOCGIFMETRIC 0x891d
|
||||
#define SIOCSIFMETRIC 0x891e
|
||||
#define SIOCGIFMEM 0x891f
|
||||
#define SIOCSIFMEM 0x8920
|
||||
#define SIOCGIFMTU 0x8921
|
||||
#define SIOCSIFMTU 0x8922
|
||||
#define SIOCSIFNAME 0x8923
|
||||
#define SIOCSIFHWADDR 0x8924
|
||||
#define SIOCGIFENCAP 0x8925
|
||||
#define SIOCSIFENCAP 0x8926
|
||||
#define SIOCGIFHWADDR 0x8927
|
||||
#define SIOCGIFSLAVE 0x8929
|
||||
#define SIOCSIFSLAVE 0x8930
|
||||
#define SIOCADDMULTI 0x8931
|
||||
#define SIOCDELMULTI 0x8932
|
||||
#define SIOCGIFINDEX 0x8933
|
||||
#define SIOGIFINDEX SIOCGIFINDEX
|
||||
#define SIOCSIFPFLAGS 0x8934
|
||||
#define SIOCGIFPFLAGS 0x8935
|
||||
#define SIOCDIFADDR 0x8936
|
||||
#define SIOCSIFHWBROADCAST 0x8937
|
||||
#define SIOCGIFCOUNT 0x8938
|
||||
|
||||
#define SIOCGIFBR 0x8940
|
||||
#define SIOCSIFBR 0x8941
|
||||
|
||||
#define SIOCGIFTXQLEN 0x8942
|
||||
#define SIOCSIFTXQLEN 0x8943
|
||||
|
||||
#define SIOCDARP 0x8953
|
||||
#define SIOCGARP 0x8954
|
||||
#define SIOCSARP 0x8955
|
||||
|
||||
#define SIOCDRARP 0x8960
|
||||
#define SIOCGRARP 0x8961
|
||||
#define SIOCSRARP 0x8962
|
||||
|
||||
#define SIOCGIFMAP 0x8970
|
||||
#define SIOCSIFMAP 0x8971
|
||||
|
||||
#define SIOCADDDLCI 0x8980
|
||||
#define SIOCDELDLCI 0x8981
|
||||
|
||||
#define SIOCDEVPRIVATE 0x89F0
|
||||
#define SIOCPROTOPRIVATE 0x89E0
|
||||
|
||||
@@ -324,6 +324,10 @@
|
||||
#define __NR_pkey_alloc 5324
|
||||
#define __NR_pkey_free 5325
|
||||
#define __NR_statx 5326
|
||||
#define __NR_rseq 4327
|
||||
#define __NR_io_pgetevents 4328
|
||||
#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
|
||||
|
||||
|
||||
@@ -165,5 +165,5 @@ struct termios {
|
||||
#define EXTPROC 0200000
|
||||
|
||||
#define XTABS 0014000
|
||||
#define TIOCSER_TEMT 0x01
|
||||
#define TIOCSER_TEMT 1
|
||||
#endif
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
#define __SYSCALL_LL_E(x) (x)
|
||||
#define __SYSCALL_LL_O(x) (x)
|
||||
|
||||
__attribute__((visibility("hidden")))
|
||||
long (__syscall)(long, ...);
|
||||
|
||||
#define SYSCALL_RLIM_INFINITY (-1UL/2)
|
||||
|
||||
#include <sys/stat.h>
|
||||
@@ -79,16 +76,14 @@ static inline long __syscall2(long n, long a, long b)
|
||||
{
|
||||
struct kernel_stat kst;
|
||||
long ret;
|
||||
register long r4 __asm__("$4");
|
||||
register long r5 __asm__("$5");
|
||||
register long r4 __asm__("$4") = a;
|
||||
register long r5 __asm__("$5") = b;
|
||||
register long r7 __asm__("$7");
|
||||
register long r2 __asm__("$2");
|
||||
|
||||
r5 = b;
|
||||
if (n == SYS_stat || n == SYS_fstat || n == SYS_lstat)
|
||||
r5 = (long) &kst;
|
||||
|
||||
r4 = a;
|
||||
__asm__ __volatile__ (
|
||||
"daddu $2,$0,%2 ; syscall"
|
||||
: "=&r"(r2), "=r"(r7) : "ir"(n), "0"(r2), "1"(r7),
|
||||
@@ -109,18 +104,15 @@ static inline long __syscall3(long n, long a, long b, long c)
|
||||
{
|
||||
struct kernel_stat kst;
|
||||
long ret;
|
||||
register long r4 __asm__("$4");
|
||||
register long r5 __asm__("$5");
|
||||
register long r6 __asm__("$6");
|
||||
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");
|
||||
|
||||
r5 = b;
|
||||
if (n == SYS_stat || n == SYS_fstat || n == SYS_lstat)
|
||||
r5 = (long) &kst;
|
||||
|
||||
r4 = a;
|
||||
r6 = c;
|
||||
__asm__ __volatile__ (
|
||||
"daddu $2,$0,%2 ; syscall"
|
||||
: "=&r"(r2), "=r"(r7) : "ir"(n), "0"(r2), "1"(r7),
|
||||
@@ -141,16 +133,12 @@ static inline long __syscall4(long n, long a, long b, long c, long d)
|
||||
{
|
||||
struct kernel_stat kst;
|
||||
long ret;
|
||||
register long r4 __asm__("$4");
|
||||
register long r5 __asm__("$5");
|
||||
register long r6 __asm__("$6");
|
||||
register long r7 __asm__("$7");
|
||||
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");
|
||||
|
||||
r4 = a;
|
||||
r5 = b;
|
||||
r6 = c;
|
||||
r7 = d;
|
||||
if (n == SYS_stat || n == SYS_fstat || n == SYS_lstat)
|
||||
r5 = (long) &kst;
|
||||
if (n == SYS_newfstatat)
|
||||
@@ -176,48 +164,71 @@ static inline long __syscall4(long n, long a, long b, long c, long d)
|
||||
|
||||
static inline long __syscall5(long n, long a, long b, long c, long d, long e)
|
||||
{
|
||||
long r2;
|
||||
long old_b = b;
|
||||
long old_c = c;
|
||||
struct kernel_stat kst;
|
||||
long ret;
|
||||
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");
|
||||
|
||||
if (n == SYS_stat || n == SYS_fstat || n == SYS_lstat)
|
||||
b = (long) &kst;
|
||||
r5 = (long) &kst;
|
||||
if (n == SYS_newfstatat)
|
||||
c = (long) &kst;
|
||||
r6 = (long) &kst;
|
||||
|
||||
r2 = (__syscall)(n, a, b, c, d, e);
|
||||
if (r2 > -4096UL) return r2;
|
||||
__asm__ __volatile__ (
|
||||
"daddu $2,$0,%2 ; syscall"
|
||||
: "=&r"(r2), "=r"(r7) : "ir"(n), "0"(r2), "1"(r7),
|
||||
"r"(r4), "r"(r5), "r"(r6), "r"(r8)
|
||||
: "$1", "$3", "$9", "$10", "$11", "$12", "$13",
|
||||
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
|
||||
|
||||
if (r7) return -r2;
|
||||
ret = r2;
|
||||
|
||||
if (n == SYS_stat || n == SYS_fstat || n == SYS_lstat)
|
||||
__stat_fix(&kst, (struct stat *)old_b);
|
||||
__stat_fix(&kst, (struct stat *)b);
|
||||
if (n == SYS_newfstatat)
|
||||
__stat_fix(&kst, (struct stat *)old_c);
|
||||
__stat_fix(&kst, (struct stat *)c);
|
||||
|
||||
return r2;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline long __syscall6(long n, long a, long b, long c, long d, long e, long f)
|
||||
{
|
||||
long r2;
|
||||
long old_b = b;
|
||||
long old_c = c;
|
||||
struct kernel_stat kst;
|
||||
long ret;
|
||||
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");
|
||||
|
||||
if (n == SYS_stat || n == SYS_fstat || n == SYS_lstat)
|
||||
b = (long) &kst;
|
||||
r5 = (long) &kst;
|
||||
if (n == SYS_newfstatat)
|
||||
c = (long) &kst;
|
||||
r6 = (long) &kst;
|
||||
|
||||
r2 = (__syscall)(n, a, b, c, d, e, f);
|
||||
if (r2 > -4096UL) return r2;
|
||||
__asm__ __volatile__ (
|
||||
"daddu $2,$0,%2 ; syscall"
|
||||
: "=&r"(r2), "=r"(r7) : "ir"(n), "0"(r2), "1"(r7),
|
||||
"r"(r4), "r"(r5), "r"(r6), "r"(r8), "r"(r9)
|
||||
: "$1", "$3", "$10", "$11", "$12", "$13",
|
||||
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
|
||||
|
||||
if (r7) return -r2;
|
||||
ret = r2;
|
||||
|
||||
if (n == SYS_stat || n == SYS_fstat || n == SYS_lstat)
|
||||
__stat_fix(&kst, (struct stat *)old_b);
|
||||
__stat_fix(&kst, (struct stat *)b);
|
||||
if (n == SYS_newfstatat)
|
||||
__stat_fix(&kst, (struct stat *)old_c);
|
||||
__stat_fix(&kst, (struct stat *)c);
|
||||
|
||||
return r2;
|
||||
return ret;
|
||||
}
|
||||
|
||||
#define VDSO_USEFUL
|
||||
|
||||
@@ -78,14 +78,6 @@
|
||||
#define TIOCGSERIAL 0x541E
|
||||
#define TIOCSSERIAL 0x541F
|
||||
#define TIOCPKT 0x5420
|
||||
#define TIOCPKT_DATA 0
|
||||
#define TIOCPKT_FLUSHREAD 1
|
||||
#define TIOCPKT_FLUSHWRITE 2
|
||||
#define TIOCPKT_STOP 4
|
||||
#define TIOCPKT_START 8
|
||||
#define TIOCPKT_NOSTOP 16
|
||||
#define TIOCPKT_DOSTOP 32
|
||||
#define TIOCPKT_IOCTL 64
|
||||
|
||||
#define TIOCNOTTY 0x5422
|
||||
#define TIOCSETD 0x5423
|
||||
@@ -113,38 +105,12 @@
|
||||
#define TIOCSLCKTRMIOS 0x5457
|
||||
#define TIOCSERGSTRUCT 0x5458
|
||||
#define TIOCSERGETLSR 0x5459
|
||||
#define TIOCSER_TEMT 0x01
|
||||
#define TIOCSERGETMULTI 0x545A
|
||||
#define TIOCSERSETMULTI 0x545B
|
||||
|
||||
#define TIOCMIWAIT 0x545C
|
||||
#define TIOCGICOUNT 0x545D
|
||||
|
||||
|
||||
struct winsize {
|
||||
unsigned short ws_row;
|
||||
unsigned short ws_col;
|
||||
unsigned short ws_xpixel;
|
||||
unsigned short ws_ypixel;
|
||||
};
|
||||
|
||||
#define N_TTY 0
|
||||
#define N_SLIP 1
|
||||
#define N_MOUSE 2
|
||||
#define N_PPP 3
|
||||
#define N_STRIP 4
|
||||
#define N_AX25 5
|
||||
#define N_X25 6
|
||||
#define N_6PACK 7
|
||||
#define N_MASC 8
|
||||
#define N_R3964 9
|
||||
#define N_PROFIBUS_FDL 10
|
||||
#define N_IRDA 11
|
||||
#define N_SMSBLOCK 12
|
||||
#define N_HDLC 13
|
||||
#define N_SYNC_PPP 14
|
||||
#define N_HCI 15
|
||||
|
||||
#define FIOSETOWN 0x8901
|
||||
#define SIOCSPGRP 0x8902
|
||||
#define FIOGETOWN 0x8903
|
||||
@@ -152,66 +118,3 @@ struct winsize {
|
||||
#define SIOCATMARK 0x8905
|
||||
#define SIOCGSTAMP 0x8906
|
||||
#define SIOCGSTAMPNS 0x8907
|
||||
|
||||
#define SIOCADDRT 0x890B
|
||||
#define SIOCDELRT 0x890C
|
||||
#define SIOCRTMSG 0x890D
|
||||
|
||||
#define SIOCGIFNAME 0x8910
|
||||
#define SIOCSIFLINK 0x8911
|
||||
#define SIOCGIFCONF 0x8912
|
||||
#define SIOCGIFFLAGS 0x8913
|
||||
#define SIOCSIFFLAGS 0x8914
|
||||
#define SIOCGIFADDR 0x8915
|
||||
#define SIOCSIFADDR 0x8916
|
||||
#define SIOCGIFDSTADDR 0x8917
|
||||
#define SIOCSIFDSTADDR 0x8918
|
||||
#define SIOCGIFBRDADDR 0x8919
|
||||
#define SIOCSIFBRDADDR 0x891a
|
||||
#define SIOCGIFNETMASK 0x891b
|
||||
#define SIOCSIFNETMASK 0x891c
|
||||
#define SIOCGIFMETRIC 0x891d
|
||||
#define SIOCSIFMETRIC 0x891e
|
||||
#define SIOCGIFMEM 0x891f
|
||||
#define SIOCSIFMEM 0x8920
|
||||
#define SIOCGIFMTU 0x8921
|
||||
#define SIOCSIFMTU 0x8922
|
||||
#define SIOCSIFNAME 0x8923
|
||||
#define SIOCSIFHWADDR 0x8924
|
||||
#define SIOCGIFENCAP 0x8925
|
||||
#define SIOCSIFENCAP 0x8926
|
||||
#define SIOCGIFHWADDR 0x8927
|
||||
#define SIOCGIFSLAVE 0x8929
|
||||
#define SIOCSIFSLAVE 0x8930
|
||||
#define SIOCADDMULTI 0x8931
|
||||
#define SIOCDELMULTI 0x8932
|
||||
#define SIOCGIFINDEX 0x8933
|
||||
#define SIOGIFINDEX SIOCGIFINDEX
|
||||
#define SIOCSIFPFLAGS 0x8934
|
||||
#define SIOCGIFPFLAGS 0x8935
|
||||
#define SIOCDIFADDR 0x8936
|
||||
#define SIOCSIFHWBROADCAST 0x8937
|
||||
#define SIOCGIFCOUNT 0x8938
|
||||
|
||||
#define SIOCGIFBR 0x8940
|
||||
#define SIOCSIFBR 0x8941
|
||||
|
||||
#define SIOCGIFTXQLEN 0x8942
|
||||
#define SIOCSIFTXQLEN 0x8943
|
||||
|
||||
#define SIOCDARP 0x8953
|
||||
#define SIOCGARP 0x8954
|
||||
#define SIOCSARP 0x8955
|
||||
|
||||
#define SIOCDRARP 0x8960
|
||||
#define SIOCGRARP 0x8961
|
||||
#define SIOCSRARP 0x8962
|
||||
|
||||
#define SIOCGIFMAP 0x8970
|
||||
#define SIOCSIFMAP 0x8971
|
||||
|
||||
#define SIOCADDDLCI 0x8980
|
||||
#define SIOCDELDLCI 0x8981
|
||||
|
||||
#define SIOCDEVPRIVATE 0x89F0
|
||||
#define SIOCPROTOPRIVATE 0x89E0
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
#define PTRACE_SET_DEBUGREG 0x1a
|
||||
#define PTRACE_GETVSRREGS 0x1b
|
||||
#define PTRACE_SETVSRREGS 0x1c
|
||||
#define PTRACE_SYSEMU 0x1d
|
||||
#define PTRACE_SYSEMU_SINGLESTEP 0x1e
|
||||
#define PTRACE_SINGLEBLOCK 0x100
|
||||
|
||||
#define PT_GETVRREGS PTRACE_GETVRREGS
|
||||
|
||||
@@ -373,4 +373,38 @@
|
||||
#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
|
||||
|
||||
|
||||
@@ -167,5 +167,5 @@ struct termios {
|
||||
#define EXTPROC 0x10000000
|
||||
|
||||
#define XTABS 00006000
|
||||
#define TIOCSER_TEMT 0x01
|
||||
#define TIOCSER_TEMT 1
|
||||
#endif
|
||||
|
||||
@@ -3,7 +3,89 @@
|
||||
((union { long long ll; long l[2]; }){ .ll = x }).l[1]
|
||||
#define __SYSCALL_LL_O(x) 0, __SYSCALL_LL_E((x))
|
||||
|
||||
#undef SYSCALL_NO_INLINE
|
||||
#define SYSCALL_NO_INLINE
|
||||
static inline long __syscall0(long n)
|
||||
{
|
||||
register long r0 __asm__("r0") = n;
|
||||
register long r3 __asm__("r3");
|
||||
__asm__ __volatile__("sc ; bns+ 1f ; neg %1, %1 ; 1:"
|
||||
: "+r"(r0), "=r"(r3)
|
||||
:: "memory", "cr0", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12");
|
||||
return r3;
|
||||
}
|
||||
|
||||
static inline long __syscall1(long n, long a)
|
||||
{
|
||||
register long r0 __asm__("r0") = n;
|
||||
register long r3 __asm__("r3") = a;
|
||||
__asm__ __volatile__("sc ; bns+ 1f ; neg %1, %1 ; 1:"
|
||||
: "+r"(r0), "+r"(r3)
|
||||
:: "memory", "cr0", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12");
|
||||
return r3;
|
||||
}
|
||||
|
||||
static inline long __syscall2(long n, long a, long b)
|
||||
{
|
||||
register long r0 __asm__("r0") = n;
|
||||
register long r3 __asm__("r3") = a;
|
||||
register long r4 __asm__("r4") = b;
|
||||
__asm__ __volatile__("sc ; bns+ 1f ; neg %1, %1 ; 1:"
|
||||
: "+r"(r0), "+r"(r3), "+r"(r4)
|
||||
:: "memory", "cr0", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12");
|
||||
return r3;
|
||||
}
|
||||
|
||||
static inline long __syscall3(long n, long a, long b, long c)
|
||||
{
|
||||
register long r0 __asm__("r0") = n;
|
||||
register long r3 __asm__("r3") = a;
|
||||
register long r4 __asm__("r4") = b;
|
||||
register long r5 __asm__("r5") = c;
|
||||
__asm__ __volatile__("sc ; bns+ 1f ; neg %1, %1 ; 1:"
|
||||
: "+r"(r0), "+r"(r3), "+r"(r4), "+r"(r5)
|
||||
:: "memory", "cr0", "r6", "r7", "r8", "r9", "r10", "r11", "r12");
|
||||
return r3;
|
||||
}
|
||||
|
||||
static inline long __syscall4(long n, long a, long b, long c, long d)
|
||||
{
|
||||
register long r0 __asm__("r0") = n;
|
||||
register long r3 __asm__("r3") = a;
|
||||
register long r4 __asm__("r4") = b;
|
||||
register long r5 __asm__("r5") = c;
|
||||
register long r6 __asm__("r6") = d;
|
||||
__asm__ __volatile__("sc ; bns+ 1f ; neg %1, %1 ; 1:"
|
||||
: "+r"(r0), "+r"(r3), "+r"(r4), "+r"(r5), "+r"(r6)
|
||||
:: "memory", "cr0", "r7", "r8", "r9", "r10", "r11", "r12");
|
||||
return r3;
|
||||
}
|
||||
|
||||
static inline long __syscall5(long n, long a, long b, long c, long d, long e)
|
||||
{
|
||||
register long r0 __asm__("r0") = n;
|
||||
register long r3 __asm__("r3") = a;
|
||||
register long r4 __asm__("r4") = b;
|
||||
register long r5 __asm__("r5") = c;
|
||||
register long r6 __asm__("r6") = d;
|
||||
register long r7 __asm__("r7") = e;
|
||||
__asm__ __volatile__("sc ; bns+ 1f ; neg %1, %1 ; 1:"
|
||||
: "+r"(r0), "+r"(r3), "+r"(r4), "+r"(r5), "+r"(r6), "+r"(r7)
|
||||
:: "memory", "cr0", "r8", "r9", "r10", "r11", "r12");
|
||||
return r3;
|
||||
}
|
||||
|
||||
static inline long __syscall6(long n, long a, long b, long c, long d, long e, long f)
|
||||
{
|
||||
register long r0 __asm__("r0") = n;
|
||||
register long r3 __asm__("r3") = a;
|
||||
register long r4 __asm__("r4") = b;
|
||||
register long r5 __asm__("r5") = c;
|
||||
register long r6 __asm__("r6") = d;
|
||||
register long r7 __asm__("r7") = e;
|
||||
register long r8 __asm__("r8") = f;
|
||||
__asm__ __volatile__("sc ; bns+ 1f ; neg %1, %1 ; 1:"
|
||||
: "+r"(r0), "+r"(r3), "+r"(r4), "+r"(r5), "+r"(r6), "+r"(r7), "+r"(r8)
|
||||
:: "memory", "cr0", "r9", "r10", "r11", "r12");
|
||||
return r3;
|
||||
}
|
||||
|
||||
#define SYSCALL_FADVISE_6_ARG
|
||||
|
||||
@@ -78,14 +78,6 @@
|
||||
#define TIOCGSERIAL 0x541E
|
||||
#define TIOCSSERIAL 0x541F
|
||||
#define TIOCPKT 0x5420
|
||||
#define TIOCPKT_DATA 0
|
||||
#define TIOCPKT_FLUSHREAD 1
|
||||
#define TIOCPKT_FLUSHWRITE 2
|
||||
#define TIOCPKT_STOP 4
|
||||
#define TIOCPKT_START 8
|
||||
#define TIOCPKT_NOSTOP 16
|
||||
#define TIOCPKT_DOSTOP 32
|
||||
#define TIOCPKT_IOCTL 64
|
||||
|
||||
#define TIOCNOTTY 0x5422
|
||||
#define TIOCSETD 0x5423
|
||||
@@ -113,38 +105,12 @@
|
||||
#define TIOCSLCKTRMIOS 0x5457
|
||||
#define TIOCSERGSTRUCT 0x5458
|
||||
#define TIOCSERGETLSR 0x5459
|
||||
#define TIOCSER_TEMT 0x01
|
||||
#define TIOCSERGETMULTI 0x545A
|
||||
#define TIOCSERSETMULTI 0x545B
|
||||
|
||||
#define TIOCMIWAIT 0x545C
|
||||
#define TIOCGICOUNT 0x545D
|
||||
|
||||
|
||||
struct winsize {
|
||||
unsigned short ws_row;
|
||||
unsigned short ws_col;
|
||||
unsigned short ws_xpixel;
|
||||
unsigned short ws_ypixel;
|
||||
};
|
||||
|
||||
#define N_TTY 0
|
||||
#define N_SLIP 1
|
||||
#define N_MOUSE 2
|
||||
#define N_PPP 3
|
||||
#define N_STRIP 4
|
||||
#define N_AX25 5
|
||||
#define N_X25 6
|
||||
#define N_6PACK 7
|
||||
#define N_MASC 8
|
||||
#define N_R3964 9
|
||||
#define N_PROFIBUS_FDL 10
|
||||
#define N_IRDA 11
|
||||
#define N_SMSBLOCK 12
|
||||
#define N_HDLC 13
|
||||
#define N_SYNC_PPP 14
|
||||
#define N_HCI 15
|
||||
|
||||
#define FIOSETOWN 0x8901
|
||||
#define SIOCSPGRP 0x8902
|
||||
#define FIOGETOWN 0x8903
|
||||
@@ -152,66 +118,3 @@ struct winsize {
|
||||
#define SIOCATMARK 0x8905
|
||||
#define SIOCGSTAMP 0x8906
|
||||
#define SIOCGSTAMPNS 0x8907
|
||||
|
||||
#define SIOCADDRT 0x890B
|
||||
#define SIOCDELRT 0x890C
|
||||
#define SIOCRTMSG 0x890D
|
||||
|
||||
#define SIOCGIFNAME 0x8910
|
||||
#define SIOCSIFLINK 0x8911
|
||||
#define SIOCGIFCONF 0x8912
|
||||
#define SIOCGIFFLAGS 0x8913
|
||||
#define SIOCSIFFLAGS 0x8914
|
||||
#define SIOCGIFADDR 0x8915
|
||||
#define SIOCSIFADDR 0x8916
|
||||
#define SIOCGIFDSTADDR 0x8917
|
||||
#define SIOCSIFDSTADDR 0x8918
|
||||
#define SIOCGIFBRDADDR 0x8919
|
||||
#define SIOCSIFBRDADDR 0x891a
|
||||
#define SIOCGIFNETMASK 0x891b
|
||||
#define SIOCSIFNETMASK 0x891c
|
||||
#define SIOCGIFMETRIC 0x891d
|
||||
#define SIOCSIFMETRIC 0x891e
|
||||
#define SIOCGIFMEM 0x891f
|
||||
#define SIOCSIFMEM 0x8920
|
||||
#define SIOCGIFMTU 0x8921
|
||||
#define SIOCSIFMTU 0x8922
|
||||
#define SIOCSIFNAME 0x8923
|
||||
#define SIOCSIFHWADDR 0x8924
|
||||
#define SIOCGIFENCAP 0x8925
|
||||
#define SIOCSIFENCAP 0x8926
|
||||
#define SIOCGIFHWADDR 0x8927
|
||||
#define SIOCGIFSLAVE 0x8929
|
||||
#define SIOCSIFSLAVE 0x8930
|
||||
#define SIOCADDMULTI 0x8931
|
||||
#define SIOCDELMULTI 0x8932
|
||||
#define SIOCGIFINDEX 0x8933
|
||||
#define SIOGIFINDEX SIOCGIFINDEX
|
||||
#define SIOCSIFPFLAGS 0x8934
|
||||
#define SIOCGIFPFLAGS 0x8935
|
||||
#define SIOCDIFADDR 0x8936
|
||||
#define SIOCSIFHWBROADCAST 0x8937
|
||||
#define SIOCGIFCOUNT 0x8938
|
||||
|
||||
#define SIOCGIFBR 0x8940
|
||||
#define SIOCSIFBR 0x8941
|
||||
|
||||
#define SIOCGIFTXQLEN 0x8942
|
||||
#define SIOCSIFTXQLEN 0x8943
|
||||
|
||||
#define SIOCDARP 0x8953
|
||||
#define SIOCGARP 0x8954
|
||||
#define SIOCSARP 0x8955
|
||||
|
||||
#define SIOCDRARP 0x8960
|
||||
#define SIOCGRARP 0x8961
|
||||
#define SIOCSRARP 0x8962
|
||||
|
||||
#define SIOCGIFMAP 0x8970
|
||||
#define SIOCSIFMAP 0x8971
|
||||
|
||||
#define SIOCADDDLCI 0x8980
|
||||
#define SIOCDELDLCI 0x8981
|
||||
|
||||
#define SIOCDEVPRIVATE 0x89F0
|
||||
#define SIOCPROTOPRIVATE 0x89E0
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
#define PTRACE_SET_DEBUGREG 0x1a
|
||||
#define PTRACE_GETVSRREGS 0x1b
|
||||
#define PTRACE_SETVSRREGS 0x1c
|
||||
#define PTRACE_SYSEMU 0x1d
|
||||
#define PTRACE_SYSEMU_SINGLESTEP 0x1e
|
||||
#define PTRACE_SINGLEBLOCK 0x100
|
||||
|
||||
#define PT_GETVRREGS PTRACE_GETVRREGS
|
||||
|
||||
@@ -16,11 +16,18 @@ typedef struct {
|
||||
} fpregset_t;
|
||||
|
||||
typedef struct {
|
||||
unsigned __int128 vrregs[32];
|
||||
unsigned _pad[3];
|
||||
unsigned vrsave;
|
||||
unsigned vscr;
|
||||
unsigned _pad2[3];
|
||||
#ifdef __GNUC__
|
||||
__attribute__((__aligned__(16)))
|
||||
#endif
|
||||
unsigned vrregs[32][4];
|
||||
struct {
|
||||
#if __BIG_ENDIAN__
|
||||
unsigned _pad[3], vscr_word;
|
||||
#else
|
||||
unsigned vscr_word, _pad[3];
|
||||
#endif
|
||||
} vscr;
|
||||
unsigned vrsave, _pad[3];
|
||||
} vrregset_t;
|
||||
|
||||
typedef struct sigcontext {
|
||||
|
||||
@@ -364,4 +364,19 @@
|
||||
#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
|
||||
|
||||
|
||||
@@ -167,5 +167,5 @@ struct termios {
|
||||
#define EXTPROC 0x10000000
|
||||
|
||||
#define XTABS 00006000
|
||||
#define TIOCSER_TEMT 0x01
|
||||
#define TIOCSER_TEMT 1
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
#define a_barrier a_barrier
|
||||
static inline void a_barrier()
|
||||
{
|
||||
__asm__ __volatile__ ("fence rw,rw" : : : "memory");
|
||||
}
|
||||
|
||||
#define a_cas a_cas
|
||||
static inline int a_cas(volatile int *p, int t, int s)
|
||||
{
|
||||
int old, tmp;
|
||||
__asm__("\n1: lr.w.aqrl %0, %2\n"
|
||||
" bne %0, %3, 1f\n"
|
||||
" sc.w.aqrl %1, %4, %2\n"
|
||||
" bnez %1, 1b\n"
|
||||
"1:"
|
||||
: "=&r"(old), "+r"(tmp), "+A"(*p)
|
||||
: "r"(t), "r"(s));
|
||||
return old;
|
||||
}
|
||||
|
||||
#define a_cas_p a_cas_p
|
||||
static inline void *a_cas_p(volatile void *p, void *t, void *s)
|
||||
{
|
||||
void *old;
|
||||
int tmp;
|
||||
__asm__("\n1: lr.d.aqrl %0, %2\n"
|
||||
" bne %0, %3, 1f\n"
|
||||
" sc.d.aqrl %1, %4, %2\n"
|
||||
" bnez %1, 1b\n"
|
||||
"1:"
|
||||
: "=&r"(old), "+r"(tmp), "+A"(*(long *)p)
|
||||
: "r"(t), "r"(s));
|
||||
return old;
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
#define _Addr long
|
||||
#define _Int64 long
|
||||
#define _Reg long
|
||||
|
||||
TYPEDEF __builtin_va_list va_list;
|
||||
TYPEDEF __builtin_va_list __isoc_va_list;
|
||||
|
||||
#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;
|
||||
|
||||
TYPEDEF long time_t;
|
||||
TYPEDEF long suseconds_t;
|
||||
|
||||
TYPEDEF struct { union { int __i[14]; volatile int __vi[14]; unsigned long __s[7]; } __u; } pthread_attr_t;
|
||||
TYPEDEF struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } pthread_mutex_t;
|
||||
TYPEDEF struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } mtx_t;
|
||||
TYPEDEF struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } pthread_cond_t;
|
||||
TYPEDEF struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } cnd_t;
|
||||
TYPEDEF struct { union { int __i[14]; volatile int __vi[14]; void *__p[7]; } __u; } pthread_rwlock_t;
|
||||
TYPEDEF struct { union { int __i[8]; volatile int __vi[8]; void *__p[4]; } __u; } pthread_barrier_t;
|
||||
@@ -0,0 +1 @@
|
||||
#define __BYTE_ORDER __LITTLE_ENDIAN
|
||||
@@ -0,0 +1,38 @@
|
||||
#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_GETLK 5
|
||||
#define F_SETLK 6
|
||||
#define F_SETLKW 7
|
||||
#define F_SETOWN 8
|
||||
#define F_GETOWN 9
|
||||
#define F_SETSIG 10
|
||||
#define F_GETSIG 11
|
||||
|
||||
#define F_SETOWN_EX 15
|
||||
#define F_GETOWN_EX 16
|
||||
|
||||
#define F_GETOWNER_UIDS 17
|
||||
@@ -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)
|
||||
@@ -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
|
||||
@@ -0,0 +1,14 @@
|
||||
struct ipc_perm {
|
||||
key_t __ipc_perm_key;
|
||||
uid_t uid;
|
||||
gid_t gid;
|
||||
uid_t cuid;
|
||||
gid_t cgid;
|
||||
mode_t mode;
|
||||
unsigned short __ipc_perm_seq;
|
||||
|
||||
unsigned long __pad1;
|
||||
unsigned long __pad2;
|
||||
};
|
||||
|
||||
#define IPC_64 0
|
||||
@@ -0,0 +1,7 @@
|
||||
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
|
||||
|| defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
||||
#define LONG_BIT 64
|
||||
#endif
|
||||
|
||||
#define LONG_MAX 0x7fffffffffffffffL
|
||||
#define LLONG_MAX 0x7fffffffffffffffLL
|
||||
@@ -0,0 +1,13 @@
|
||||
struct msqid_ds {
|
||||
struct ipc_perm msg_perm;
|
||||
time_t msg_stime;
|
||||
time_t msg_rtime;
|
||||
time_t msg_ctime;
|
||||
unsigned long msg_cbytes;
|
||||
msgqnum_t msg_qnum;
|
||||
msglen_t msg_qbytes;
|
||||
pid_t msg_lspid;
|
||||
pid_t msg_lrpid;
|
||||
unsigned long __pad1;
|
||||
unsigned long __pad2;
|
||||
};
|
||||
@@ -0,0 +1,2 @@
|
||||
#define _POSIX_V6_LP64_OFF64 1
|
||||
#define _POSIX_V7_LP64_OFF64 1
|
||||
@@ -0,0 +1,8 @@
|
||||
#undef __WORDSIZE
|
||||
#define __WORDSIZE 64
|
||||
#define REG_PC 0
|
||||
#define REG_RA 1
|
||||
#define REG_SP 2
|
||||
#define REG_TP 4
|
||||
#define REG_S0 8
|
||||
#define REG_A0 10
|
||||
@@ -0,0 +1,9 @@
|
||||
struct semid_ds {
|
||||
struct ipc_perm sem_perm;
|
||||
time_t sem_otime;
|
||||
time_t sem_ctime;
|
||||
unsigned short sem_nsems;
|
||||
char __sem_nsems_pad[sizeof(time_t)-sizeof(short)];
|
||||
time_t __unused3;
|
||||
time_t __unused4;
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
typedef unsigned long __jmp_buf[26];
|
||||
@@ -0,0 +1,25 @@
|
||||
#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 __pad1;
|
||||
unsigned long __pad2;
|
||||
};
|
||||
|
||||
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;
|
||||
};
|
||||
@@ -0,0 +1,112 @@
|
||||
#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
|
||||
|
||||
/* gregs[0] holds the program counter. */
|
||||
|
||||
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
||||
typedef unsigned long greg_t;
|
||||
typedef unsigned long gregset_t[32];
|
||||
|
||||
struct __riscv_f_ext_state {
|
||||
unsigned int f[32];
|
||||
unsigned int fcsr;
|
||||
};
|
||||
|
||||
struct __riscv_d_ext_state {
|
||||
unsigned long long f[32];
|
||||
unsigned int fcsr;
|
||||
};
|
||||
|
||||
struct __riscv_q_ext_state {
|
||||
unsigned long long f[64] __attribute__((aligned(16)));
|
||||
unsigned int fcsr;
|
||||
unsigned int reserved[3];
|
||||
};
|
||||
|
||||
union __riscv_fp_state {
|
||||
struct __riscv_f_ext_state f;
|
||||
struct __riscv_d_ext_state d;
|
||||
struct __riscv_q_ext_state q;
|
||||
};
|
||||
|
||||
typedef union __riscv_fp_state fpregset_t;
|
||||
|
||||
typedef struct sigcontext {
|
||||
gregset_t gregs;
|
||||
fpregset_t fpregs;
|
||||
} mcontext_t;
|
||||
|
||||
#else
|
||||
typedef struct {
|
||||
unsigned long gregs[32];
|
||||
unsigned long long fpregs[66];
|
||||
} 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;
|
||||
sigset_t uc_sigmask;
|
||||
mcontext_t uc_mcontext;
|
||||
} 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 SIGIO
|
||||
#define SIGPWR 30
|
||||
#define SIGSYS 31
|
||||
#define SIGUNUSED SIGSYS
|
||||
|
||||
#define _NSIG 65
|
||||
@@ -0,0 +1,19 @@
|
||||
#include <endian.h>
|
||||
|
||||
struct msghdr {
|
||||
void *msg_name;
|
||||
socklen_t msg_namelen;
|
||||
struct iovec *msg_iov;
|
||||
int msg_iovlen, __pad1;
|
||||
void *msg_control;
|
||||
socklen_t msg_controllen;
|
||||
int __pad2;
|
||||
int msg_flags;
|
||||
};
|
||||
|
||||
struct cmsghdr {
|
||||
socklen_t cmsg_len;
|
||||
int __pad1;
|
||||
int cmsg_level;
|
||||
int cmsg_type;
|
||||
};
|
||||
@@ -0,0 +1,18 @@
|
||||
struct stat {
|
||||
dev_t st_dev;
|
||||
ino_t st_ino;
|
||||
mode_t st_mode;
|
||||
nlink_t st_nlink;
|
||||
uid_t st_uid;
|
||||
gid_t st_gid;
|
||||
dev_t st_rdev;
|
||||
unsigned long __pad;
|
||||
off_t st_size;
|
||||
blksize_t st_blksize;
|
||||
int __pad2;
|
||||
blkcnt_t st_blocks;
|
||||
struct timespec st_atim;
|
||||
struct timespec st_mtim;
|
||||
struct timespec st_ctim;
|
||||
unsigned __unused[2];
|
||||
};
|
||||
@@ -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
|
||||
@@ -0,0 +1,277 @@
|
||||
#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_fstatat 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_sysriscv __NR_arch_specific_syscall
|
||||
#define __NR_riscv_flush_icache (__NR_sysriscv + 15)
|
||||
@@ -0,0 +1,43 @@
|
||||
struct user_regs_struct {
|
||||
unsigned long pc;
|
||||
unsigned long ra;
|
||||
unsigned long sp;
|
||||
unsigned long gp;
|
||||
unsigned long tp;
|
||||
unsigned long t0;
|
||||
unsigned long t1;
|
||||
unsigned long t2;
|
||||
unsigned long s0;
|
||||
unsigned long s1;
|
||||
unsigned long a0;
|
||||
unsigned long a1;
|
||||
unsigned long a2;
|
||||
unsigned long a3;
|
||||
unsigned long a4;
|
||||
unsigned long a5;
|
||||
unsigned long a6;
|
||||
unsigned long a7;
|
||||
unsigned long s2;
|
||||
unsigned long s3;
|
||||
unsigned long s4;
|
||||
unsigned long s5;
|
||||
unsigned long s6;
|
||||
unsigned long s7;
|
||||
unsigned long s8;
|
||||
unsigned long s9;
|
||||
unsigned long s10;
|
||||
unsigned long s11;
|
||||
unsigned long t3;
|
||||
unsigned long t4;
|
||||
unsigned long t5;
|
||||
unsigned long t6;
|
||||
};
|
||||
|
||||
struct user_fpregs_struct {
|
||||
double f[32];
|
||||
unsigned int fcsr;
|
||||
};
|
||||
|
||||
#define ELF_NGREG 32
|
||||
typedef unsigned long elf_greg_t, elf_gregset_t[ELF_NGREG];
|
||||
typedef struct user_fpregs_struct elf_fpregset_t;
|
||||
@@ -0,0 +1,19 @@
|
||||
__asm__(
|
||||
".section .sdata,\"aw\"\n"
|
||||
".text\n"
|
||||
".global " START "\n"
|
||||
".type " START ",%function\n"
|
||||
START ":\n"
|
||||
".weak __global_pointer$\n"
|
||||
".hidden __global_pointer$\n"
|
||||
".option push\n"
|
||||
".option norelax\n\t"
|
||||
"lla gp, __global_pointer$\n"
|
||||
".option pop\n\t"
|
||||
"mv a0, sp\n"
|
||||
".weak _DYNAMIC\n"
|
||||
".hidden _DYNAMIC\n\t"
|
||||
"lla a1, _DYNAMIC\n\t"
|
||||
"andi sp, sp, -16\n\t"
|
||||
"tail " START "_c"
|
||||
);
|
||||
@@ -0,0 +1,14 @@
|
||||
static inline struct pthread *__pthread_self()
|
||||
{
|
||||
char *tp;
|
||||
__asm__ __volatile__("mv %0, tp" : "=r"(tp));
|
||||
return (void *)(tp - sizeof(struct pthread));
|
||||
}
|
||||
|
||||
#define TLS_ABOVE_TP
|
||||
#define GAP_ABOVE_TP 0
|
||||
#define TP_ADJ(p) ((char *)p + sizeof(struct pthread))
|
||||
|
||||
#define DTP_OFFSET 0x800
|
||||
|
||||
#define MC_PC gregs[0]
|
||||
@@ -0,0 +1,22 @@
|
||||
#if defined __riscv_float_abi_soft
|
||||
#define RISCV_FP_SUFFIX "-sf"
|
||||
#elif defined __riscv_float_abi_single
|
||||
#define RISCV_FP_SUFFIX "-sp"
|
||||
#elif defined __riscv_float_abi_double
|
||||
#define RISCV_FP_SUFFIX ""
|
||||
#endif
|
||||
|
||||
#define LDSO_ARCH "riscv64" RISCV_FP_SUFFIX
|
||||
|
||||
#define TPOFF_K 0
|
||||
|
||||
#define REL_SYMBOLIC R_RISCV_64
|
||||
#define REL_PLT R_RISCV_JUMP_SLOT
|
||||
#define REL_RELATIVE R_RISCV_RELATIVE
|
||||
#define REL_COPY R_RISCV_COPY
|
||||
#define REL_DTPMOD R_RISCV_TLS_DTPMOD64
|
||||
#define REL_DTPOFF R_RISCV_TLS_DTPREL64
|
||||
#define REL_TPOFF R_RISCV_TLS_TPREL64
|
||||
|
||||
#define CRTJMP(pc,sp) __asm__ __volatile__( \
|
||||
"mv sp, %1 ; jr %0" : : "r"(pc), "r"(sp) : "memory" )
|
||||
@@ -0,0 +1,76 @@
|
||||
#define __SYSCALL_LL_E(x) (x)
|
||||
#define __SYSCALL_LL_O(x) (x)
|
||||
|
||||
#define __asm_syscall(...) \
|
||||
__asm__ __volatile__ ("ecall\n\t" \
|
||||
: "+r"(a0) : __VA_ARGS__ : "memory"); \
|
||||
return a0; \
|
||||
|
||||
static inline long __syscall0(long n)
|
||||
{
|
||||
register long a7 __asm__("a7") = n;
|
||||
register long a0 __asm__("a0");
|
||||
__asm_syscall("r"(a7))
|
||||
}
|
||||
|
||||
static inline long __syscall1(long n, long a)
|
||||
{
|
||||
register long a7 __asm__("a7") = n;
|
||||
register long a0 __asm__("a0") = a;
|
||||
__asm_syscall("r"(a7), "0"(a0))
|
||||
}
|
||||
|
||||
static inline long __syscall2(long n, long a, long b)
|
||||
{
|
||||
register long a7 __asm__("a7") = n;
|
||||
register long a0 __asm__("a0") = a;
|
||||
register long a1 __asm__("a1") = b;
|
||||
__asm_syscall("r"(a7), "0"(a0), "r"(a1))
|
||||
}
|
||||
|
||||
static inline long __syscall3(long n, long a, long b, long c)
|
||||
{
|
||||
register long a7 __asm__("a7") = n;
|
||||
register long a0 __asm__("a0") = a;
|
||||
register long a1 __asm__("a1") = b;
|
||||
register long a2 __asm__("a2") = c;
|
||||
__asm_syscall("r"(a7), "0"(a0), "r"(a1), "r"(a2))
|
||||
}
|
||||
|
||||
static inline long __syscall4(long n, long a, long b, long c, long d)
|
||||
{
|
||||
register long a7 __asm__("a7") = n;
|
||||
register long a0 __asm__("a0") = a;
|
||||
register long a1 __asm__("a1") = b;
|
||||
register long a2 __asm__("a2") = c;
|
||||
register long a3 __asm__("a3") = d;
|
||||
__asm_syscall("r"(a7), "0"(a0), "r"(a1), "r"(a2), "r"(a3))
|
||||
}
|
||||
|
||||
static inline long __syscall5(long n, long a, long b, long c, long d, long e)
|
||||
{
|
||||
register long a7 __asm__("a7") = n;
|
||||
register long a0 __asm__("a0") = a;
|
||||
register long a1 __asm__("a1") = b;
|
||||
register long a2 __asm__("a2") = c;
|
||||
register long a3 __asm__("a3") = d;
|
||||
register long a4 __asm__("a4") = e;
|
||||
__asm_syscall("r"(a7), "0"(a0), "r"(a1), "r"(a2), "r"(a3), "r"(a4))
|
||||
}
|
||||
|
||||
static inline long __syscall6(long n, long a, long b, long c, long d, long e, long f)
|
||||
{
|
||||
register long a7 __asm__("a7") = n;
|
||||
register long a0 __asm__("a0") = a;
|
||||
register long a1 __asm__("a1") = b;
|
||||
register long a2 __asm__("a2") = c;
|
||||
register long a3 __asm__("a3") = d;
|
||||
register long a4 __asm__("a4") = e;
|
||||
register long a5 __asm__("a5") = f;
|
||||
__asm_syscall("r"(a7), "0"(a0), "r"(a1), "r"(a2), "r"(a3), "r"(a4), "r"(a5))
|
||||
}
|
||||
|
||||
#define VDSO_USEFUL
|
||||
/* We don't have a clock_gettime function.
|
||||
#define VDSO_CGT_SYM "__vdso_clock_gettime"
|
||||
#define VDSO_CGT_VER "LINUX_2.6" */
|
||||
@@ -38,3 +38,6 @@
|
||||
#define F_GETOWN_EX 16
|
||||
|
||||
#define F_GETOWNER_UIDS 17
|
||||
|
||||
#define POSIX_FADV_DONTNEED 6
|
||||
#define POSIX_FADV_NOREUSE 7
|
||||
|
||||
@@ -15,30 +15,3 @@ struct cmsghdr {
|
||||
int cmsg_level;
|
||||
int cmsg_type;
|
||||
};
|
||||
|
||||
#define SO_DEBUG 1
|
||||
#define SO_REUSEADDR 2
|
||||
#define SO_TYPE 3
|
||||
#define SO_ERROR 4
|
||||
#define SO_DONTROUTE 5
|
||||
#define SO_BROADCAST 6
|
||||
#define SO_SNDBUF 7
|
||||
#define SO_RCVBUF 8
|
||||
#define SO_KEEPALIVE 9
|
||||
#define SO_OOBINLINE 10
|
||||
#define SO_NO_CHECK 11
|
||||
#define SO_PRIORITY 12
|
||||
#define SO_LINGER 13
|
||||
#define SO_BSDCOMPAT 14
|
||||
#define SO_REUSEPORT 15
|
||||
#define SO_PASSCRED 16
|
||||
#define SO_PEERCRED 17
|
||||
#define SO_RCVLOWAT 18
|
||||
#define SO_SNDLOWAT 19
|
||||
#define SO_RCVTIMEO 20
|
||||
#define SO_SNDTIMEO 21
|
||||
#define SO_ACCEPTCONN 30
|
||||
#define SO_SNDBUFFORCE 32
|
||||
#define SO_RCVBUFFORCE 33
|
||||
#define SO_PROTOCOL 38
|
||||
#define SO_DOMAIN 39
|
||||
|
||||
@@ -326,4 +326,22 @@
|
||||
#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
|
||||
|
||||
|
||||
@@ -333,4 +333,8 @@
|
||||
#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
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
int main();
|
||||
weak void _init();
|
||||
weak void _fini();
|
||||
_Noreturn int __libc_start_main(int (*)(), int, char **,
|
||||
int __libc_start_main(int (*)(), int, char **,
|
||||
void (*)(), void(*)(), void(*)());
|
||||
|
||||
void _start_c(long *p)
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
int main();
|
||||
weak void _init();
|
||||
weak void _fini();
|
||||
_Noreturn int __libc_start_main(int (*)(), int, char **,
|
||||
int __libc_start_main(int (*)(), int, char **,
|
||||
void (*)(), void(*)(), void(*)());
|
||||
|
||||
hidden _Noreturn void __dls2(unsigned char *base, size_t *sp)
|
||||
hidden void __dls2(unsigned char *base, size_t *sp)
|
||||
{
|
||||
__libc_start_main(main, *sp, (void *)(sp+1), _init, _fini, 0);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
#ifndef _AIO_H
|
||||
#define _AIO_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <features.h>
|
||||
#include <signal.h>
|
||||
#include <time.h>
|
||||
|
||||
#define __NEED_ssize_t
|
||||
#define __NEED_off_t
|
||||
|
||||
#include <bits/alltypes.h>
|
||||
|
||||
struct aiocb {
|
||||
int aio_fildes, aio_lio_opcode, aio_reqprio;
|
||||
volatile void *aio_buf;
|
||||
size_t aio_nbytes;
|
||||
struct sigevent aio_sigevent;
|
||||
void *__td;
|
||||
int __lock[2];
|
||||
volatile int __err;
|
||||
ssize_t __ret;
|
||||
off_t aio_offset;
|
||||
void *__next, *__prev;
|
||||
char __dummy4[32-2*sizeof(void *)];
|
||||
};
|
||||
|
||||
#define AIO_CANCELED 0
|
||||
#define AIO_NOTCANCELED 1
|
||||
#define AIO_ALLDONE 2
|
||||
|
||||
#define LIO_READ 0
|
||||
#define LIO_WRITE 1
|
||||
#define LIO_NOP 2
|
||||
|
||||
#define LIO_WAIT 0
|
||||
#define LIO_NOWAIT 1
|
||||
|
||||
int aio_read(struct aiocb *);
|
||||
int aio_write(struct aiocb *);
|
||||
int aio_error(const struct aiocb *);
|
||||
ssize_t aio_return(struct aiocb *);
|
||||
int aio_cancel(int, struct aiocb *);
|
||||
int aio_suspend(const struct aiocb *const [], int, const struct timespec *);
|
||||
int aio_fsync(int, struct aiocb *);
|
||||
|
||||
int lio_listio(int, struct aiocb *__restrict const *__restrict, int, struct sigevent *__restrict);
|
||||
|
||||
#if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
|
||||
#define aiocb64 aiocb
|
||||
#define aio_read64 aio_read
|
||||
#define aio_write64 aio_write
|
||||
#define aio_error64 aio_error
|
||||
#define aio_return64 aio_return
|
||||
#define aio_cancel64 aio_cancel
|
||||
#define aio_suspend64 aio_suspend
|
||||
#define aio_fsync64 aio_fsync
|
||||
#define lio_listio64 lio_listio
|
||||
#define off64_t off_t
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,21 @@
|
||||
#ifndef _ALLOCA_H
|
||||
#define _ALLOCA_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define __NEED_size_t
|
||||
#include <bits/alltypes.h>
|
||||
|
||||
void *alloca(size_t);
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define alloca __builtin_alloca
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,76 @@
|
||||
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 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; long tv_nsec; };
|
||||
|
||||
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 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; };
|
||||
|
||||
TYPEDEF unsigned socklen_t;
|
||||
TYPEDEF unsigned short sa_family_t;
|
||||
|
||||
#undef _Addr
|
||||
#undef _Int64
|
||||
#undef _Reg
|
||||
@@ -0,0 +1,25 @@
|
||||
#ifndef _AR_H
|
||||
#define _AR_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define ARMAG "!<arch>\n"
|
||||
#define SARMAG 8
|
||||
#define ARFMAG "`\n"
|
||||
|
||||
struct ar_hdr {
|
||||
char ar_name[16];
|
||||
char ar_date[12];
|
||||
char ar_uid[6], ar_gid[6];
|
||||
char ar_mode[8];
|
||||
char ar_size[10];
|
||||
char ar_fmag[2];
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,35 @@
|
||||
#ifndef _ARPA_FTP_H
|
||||
#define _ARPA_FTP_H
|
||||
#define PRELIM 1
|
||||
#define COMPLETE 2
|
||||
#define CONTINUE 3
|
||||
#define TRANSIENT 4
|
||||
#define ERROR 5
|
||||
#define TYPE_A 1
|
||||
#define TYPE_E 2
|
||||
#define TYPE_I 3
|
||||
#define TYPE_L 4
|
||||
#define FORM_N 1
|
||||
#define FORM_T 2
|
||||
#define FORM_C 3
|
||||
#define STRU_F 1
|
||||
#define STRU_R 2
|
||||
#define STRU_P 3
|
||||
#define MODE_S 1
|
||||
#define MODE_B 2
|
||||
#define MODE_C 3
|
||||
#define REC_ESC '\377'
|
||||
#define REC_EOR '\001'
|
||||
#define REC_EOF '\002'
|
||||
#define BLK_EOR 0x80
|
||||
#define BLK_EOF 0x40
|
||||
#define BLK_ERRORS 0x20
|
||||
#define BLK_RESTART 0x10
|
||||
#define BLK_BYTECOUNT 2
|
||||
#ifdef FTP_NAMES
|
||||
char *modenames[] = {"0", "Stream", "Block", "Compressed" };
|
||||
char *strunames[] = {"0", "File", "Record", "Page" };
|
||||
char *typenames[] = {"0", "ASCII", "EBCDIC", "Image", "Local" };
|
||||
char *formnames[] = {"0", "Nonprint", "Telnet", "Carriage-control" };
|
||||
#endif
|
||||
#endif
|
||||
@@ -0,0 +1,36 @@
|
||||
#ifndef _ARPA_INET_H
|
||||
#define _ARPA_INET_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <features.h>
|
||||
#include <netinet/in.h>
|
||||
|
||||
uint32_t htonl(uint32_t);
|
||||
uint16_t htons(uint16_t);
|
||||
uint32_t ntohl(uint32_t);
|
||||
uint16_t ntohs(uint16_t);
|
||||
|
||||
in_addr_t inet_addr (const char *);
|
||||
in_addr_t inet_network (const char *);
|
||||
char *inet_ntoa (struct in_addr);
|
||||
int inet_pton (int, const char *__restrict, void *__restrict);
|
||||
const char *inet_ntop (int, const void *__restrict, char *__restrict, socklen_t);
|
||||
|
||||
int inet_aton (const char *, struct in_addr *);
|
||||
struct in_addr inet_makeaddr(in_addr_t, in_addr_t);
|
||||
in_addr_t inet_lnaof(struct in_addr);
|
||||
in_addr_t inet_netof(struct in_addr);
|
||||
|
||||
#undef INET_ADDRSTRLEN
|
||||
#undef INET6_ADDRSTRLEN
|
||||
#define INET_ADDRSTRLEN 16
|
||||
#define INET6_ADDRSTRLEN 46
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,456 @@
|
||||
#ifndef _ARPA_NAMESER_H
|
||||
#define _ARPA_NAMESER_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <endian.h>
|
||||
|
||||
#define __NAMESER 19991006
|
||||
#define NS_PACKETSZ 512
|
||||
#define NS_MAXDNAME 1025
|
||||
#define NS_MAXMSG 65535
|
||||
#define NS_MAXCDNAME 255
|
||||
#define NS_MAXLABEL 63
|
||||
#define NS_HFIXEDSZ 12
|
||||
#define NS_QFIXEDSZ 4
|
||||
#define NS_RRFIXEDSZ 10
|
||||
#define NS_INT32SZ 4
|
||||
#define NS_INT16SZ 2
|
||||
#define NS_INT8SZ 1
|
||||
#define NS_INADDRSZ 4
|
||||
#define NS_IN6ADDRSZ 16
|
||||
#define NS_CMPRSFLGS 0xc0
|
||||
#define NS_DEFAULTPORT 53
|
||||
|
||||
typedef enum __ns_sect {
|
||||
ns_s_qd = 0,
|
||||
ns_s_zn = 0,
|
||||
ns_s_an = 1,
|
||||
ns_s_pr = 1,
|
||||
ns_s_ns = 2,
|
||||
ns_s_ud = 2,
|
||||
ns_s_ar = 3,
|
||||
ns_s_max = 4
|
||||
} ns_sect;
|
||||
|
||||
typedef struct __ns_msg {
|
||||
const unsigned char *_msg, *_eom;
|
||||
uint16_t _id, _flags, _counts[ns_s_max];
|
||||
const unsigned char *_sections[ns_s_max];
|
||||
ns_sect _sect;
|
||||
int _rrnum;
|
||||
const unsigned char *_msg_ptr;
|
||||
} ns_msg;
|
||||
|
||||
struct _ns_flagdata { int mask, shift; };
|
||||
extern const struct _ns_flagdata _ns_flagdata[];
|
||||
|
||||
#define ns_msg_id(handle) ((handle)._id + 0)
|
||||
#define ns_msg_base(handle) ((handle)._msg + 0)
|
||||
#define ns_msg_end(handle) ((handle)._eom + 0)
|
||||
#define ns_msg_size(handle) ((handle)._eom - (handle)._msg)
|
||||
#define ns_msg_count(handle, section) ((handle)._counts[section] + 0)
|
||||
#define ns_msg_getflag(handle, flag) \
|
||||
(((handle)._flags & _ns_flagdata[flag].mask) >> _ns_flagdata[flag].shift)
|
||||
|
||||
typedef struct __ns_rr {
|
||||
char name[NS_MAXDNAME];
|
||||
uint16_t type;
|
||||
uint16_t rr_class;
|
||||
uint32_t ttl;
|
||||
uint16_t rdlength;
|
||||
const unsigned char *rdata;
|
||||
} ns_rr;
|
||||
|
||||
#define ns_rr_name(rr) (((rr).name[0] != '\0') ? (rr).name : ".")
|
||||
#define ns_rr_type(rr) ((ns_type)((rr).type + 0))
|
||||
#define ns_rr_class(rr) ((ns_class)((rr).rr_class + 0))
|
||||
#define ns_rr_ttl(rr) ((rr).ttl + 0)
|
||||
#define ns_rr_rdlen(rr) ((rr).rdlength + 0)
|
||||
#define ns_rr_rdata(rr) ((rr).rdata + 0)
|
||||
|
||||
typedef enum __ns_flag {
|
||||
ns_f_qr,
|
||||
ns_f_opcode,
|
||||
ns_f_aa,
|
||||
ns_f_tc,
|
||||
ns_f_rd,
|
||||
ns_f_ra,
|
||||
ns_f_z,
|
||||
ns_f_ad,
|
||||
ns_f_cd,
|
||||
ns_f_rcode,
|
||||
ns_f_max
|
||||
} ns_flag;
|
||||
|
||||
typedef enum __ns_opcode {
|
||||
ns_o_query = 0,
|
||||
ns_o_iquery = 1,
|
||||
ns_o_status = 2,
|
||||
ns_o_notify = 4,
|
||||
ns_o_update = 5,
|
||||
ns_o_max = 6
|
||||
} ns_opcode;
|
||||
|
||||
typedef enum __ns_rcode {
|
||||
ns_r_noerror = 0,
|
||||
ns_r_formerr = 1,
|
||||
ns_r_servfail = 2,
|
||||
ns_r_nxdomain = 3,
|
||||
ns_r_notimpl = 4,
|
||||
ns_r_refused = 5,
|
||||
ns_r_yxdomain = 6,
|
||||
ns_r_yxrrset = 7,
|
||||
ns_r_nxrrset = 8,
|
||||
ns_r_notauth = 9,
|
||||
ns_r_notzone = 10,
|
||||
ns_r_max = 11,
|
||||
ns_r_badvers = 16,
|
||||
ns_r_badsig = 16,
|
||||
ns_r_badkey = 17,
|
||||
ns_r_badtime = 18
|
||||
} ns_rcode;
|
||||
|
||||
typedef enum __ns_update_operation {
|
||||
ns_uop_delete = 0,
|
||||
ns_uop_add = 1,
|
||||
ns_uop_max = 2
|
||||
} ns_update_operation;
|
||||
|
||||
struct ns_tsig_key {
|
||||
char name[NS_MAXDNAME], alg[NS_MAXDNAME];
|
||||
unsigned char *data;
|
||||
int len;
|
||||
};
|
||||
typedef struct ns_tsig_key ns_tsig_key;
|
||||
|
||||
struct ns_tcp_tsig_state {
|
||||
int counter;
|
||||
struct dst_key *key;
|
||||
void *ctx;
|
||||
unsigned char sig[NS_PACKETSZ];
|
||||
int siglen;
|
||||
};
|
||||
typedef struct ns_tcp_tsig_state ns_tcp_tsig_state;
|
||||
|
||||
#define NS_TSIG_FUDGE 300
|
||||
#define NS_TSIG_TCP_COUNT 100
|
||||
#define NS_TSIG_ALG_HMAC_MD5 "HMAC-MD5.SIG-ALG.REG.INT"
|
||||
|
||||
#define NS_TSIG_ERROR_NO_TSIG -10
|
||||
#define NS_TSIG_ERROR_NO_SPACE -11
|
||||
#define NS_TSIG_ERROR_FORMERR -12
|
||||
|
||||
typedef enum __ns_type {
|
||||
ns_t_invalid = 0,
|
||||
ns_t_a = 1,
|
||||
ns_t_ns = 2,
|
||||
ns_t_md = 3,
|
||||
ns_t_mf = 4,
|
||||
ns_t_cname = 5,
|
||||
ns_t_soa = 6,
|
||||
ns_t_mb = 7,
|
||||
ns_t_mg = 8,
|
||||
ns_t_mr = 9,
|
||||
ns_t_null = 10,
|
||||
ns_t_wks = 11,
|
||||
ns_t_ptr = 12,
|
||||
ns_t_hinfo = 13,
|
||||
ns_t_minfo = 14,
|
||||
ns_t_mx = 15,
|
||||
ns_t_txt = 16,
|
||||
ns_t_rp = 17,
|
||||
ns_t_afsdb = 18,
|
||||
ns_t_x25 = 19,
|
||||
ns_t_isdn = 20,
|
||||
ns_t_rt = 21,
|
||||
ns_t_nsap = 22,
|
||||
ns_t_nsap_ptr = 23,
|
||||
ns_t_sig = 24,
|
||||
ns_t_key = 25,
|
||||
ns_t_px = 26,
|
||||
ns_t_gpos = 27,
|
||||
ns_t_aaaa = 28,
|
||||
ns_t_loc = 29,
|
||||
ns_t_nxt = 30,
|
||||
ns_t_eid = 31,
|
||||
ns_t_nimloc = 32,
|
||||
ns_t_srv = 33,
|
||||
ns_t_atma = 34,
|
||||
ns_t_naptr = 35,
|
||||
ns_t_kx = 36,
|
||||
ns_t_cert = 37,
|
||||
ns_t_a6 = 38,
|
||||
ns_t_dname = 39,
|
||||
ns_t_sink = 40,
|
||||
ns_t_opt = 41,
|
||||
ns_t_apl = 42,
|
||||
ns_t_tkey = 249,
|
||||
ns_t_tsig = 250,
|
||||
ns_t_ixfr = 251,
|
||||
ns_t_axfr = 252,
|
||||
ns_t_mailb = 253,
|
||||
ns_t_maila = 254,
|
||||
ns_t_any = 255,
|
||||
ns_t_zxfr = 256,
|
||||
ns_t_max = 65536
|
||||
} ns_type;
|
||||
|
||||
#define ns_t_qt_p(t) (ns_t_xfr_p(t) || (t) == ns_t_any || \
|
||||
(t) == ns_t_mailb || (t) == ns_t_maila)
|
||||
#define ns_t_mrr_p(t) ((t) == ns_t_tsig || (t) == ns_t_opt)
|
||||
#define ns_t_rr_p(t) (!ns_t_qt_p(t) && !ns_t_mrr_p(t))
|
||||
#define ns_t_udp_p(t) ((t) != ns_t_axfr && (t) != ns_t_zxfr)
|
||||
#define ns_t_xfr_p(t) ((t) == ns_t_axfr || (t) == ns_t_ixfr || \
|
||||
(t) == ns_t_zxfr)
|
||||
|
||||
typedef enum __ns_class {
|
||||
ns_c_invalid = 0,
|
||||
ns_c_in = 1,
|
||||
ns_c_2 = 2,
|
||||
ns_c_chaos = 3,
|
||||
ns_c_hs = 4,
|
||||
ns_c_none = 254,
|
||||
ns_c_any = 255,
|
||||
ns_c_max = 65536
|
||||
} ns_class;
|
||||
|
||||
typedef enum __ns_key_types {
|
||||
ns_kt_rsa = 1,
|
||||
ns_kt_dh = 2,
|
||||
ns_kt_dsa = 3,
|
||||
ns_kt_private = 254
|
||||
} ns_key_types;
|
||||
|
||||
typedef enum __ns_cert_types {
|
||||
cert_t_pkix = 1,
|
||||
cert_t_spki = 2,
|
||||
cert_t_pgp = 3,
|
||||
cert_t_url = 253,
|
||||
cert_t_oid = 254
|
||||
} ns_cert_types;
|
||||
|
||||
#define NS_KEY_TYPEMASK 0xC000
|
||||
#define NS_KEY_TYPE_AUTH_CONF 0x0000
|
||||
#define NS_KEY_TYPE_CONF_ONLY 0x8000
|
||||
#define NS_KEY_TYPE_AUTH_ONLY 0x4000
|
||||
#define NS_KEY_TYPE_NO_KEY 0xC000
|
||||
#define NS_KEY_NO_AUTH 0x8000
|
||||
#define NS_KEY_NO_CONF 0x4000
|
||||
#define NS_KEY_RESERVED2 0x2000
|
||||
#define NS_KEY_EXTENDED_FLAGS 0x1000
|
||||
#define NS_KEY_RESERVED4 0x0800
|
||||
#define NS_KEY_RESERVED5 0x0400
|
||||
#define NS_KEY_NAME_TYPE 0x0300
|
||||
#define NS_KEY_NAME_USER 0x0000
|
||||
#define NS_KEY_NAME_ENTITY 0x0200
|
||||
#define NS_KEY_NAME_ZONE 0x0100
|
||||
#define NS_KEY_NAME_RESERVED 0x0300
|
||||
#define NS_KEY_RESERVED8 0x0080
|
||||
#define NS_KEY_RESERVED9 0x0040
|
||||
#define NS_KEY_RESERVED10 0x0020
|
||||
#define NS_KEY_RESERVED11 0x0010
|
||||
#define NS_KEY_SIGNATORYMASK 0x000F
|
||||
#define NS_KEY_RESERVED_BITMASK ( NS_KEY_RESERVED2 | \
|
||||
NS_KEY_RESERVED4 | \
|
||||
NS_KEY_RESERVED5 | \
|
||||
NS_KEY_RESERVED8 | \
|
||||
NS_KEY_RESERVED9 | \
|
||||
NS_KEY_RESERVED10 | \
|
||||
NS_KEY_RESERVED11 )
|
||||
#define NS_KEY_RESERVED_BITMASK2 0xFFFF
|
||||
#define NS_ALG_MD5RSA 1
|
||||
#define NS_ALG_DH 2
|
||||
#define NS_ALG_DSA 3
|
||||
#define NS_ALG_DSS NS_ALG_DSA
|
||||
#define NS_ALG_EXPIRE_ONLY 253
|
||||
#define NS_ALG_PRIVATE_OID 254
|
||||
|
||||
#define NS_KEY_PROT_TLS 1
|
||||
#define NS_KEY_PROT_EMAIL 2
|
||||
#define NS_KEY_PROT_DNSSEC 3
|
||||
#define NS_KEY_PROT_IPSEC 4
|
||||
#define NS_KEY_PROT_ANY 255
|
||||
|
||||
#define NS_MD5RSA_MIN_BITS 512
|
||||
#define NS_MD5RSA_MAX_BITS 4096
|
||||
#define NS_MD5RSA_MAX_BYTES ((NS_MD5RSA_MAX_BITS+7/8)*2+3)
|
||||
#define NS_MD5RSA_MAX_BASE64 (((NS_MD5RSA_MAX_BYTES+2)/3)*4)
|
||||
#define NS_MD5RSA_MIN_SIZE ((NS_MD5RSA_MIN_BITS+7)/8)
|
||||
#define NS_MD5RSA_MAX_SIZE ((NS_MD5RSA_MAX_BITS+7)/8)
|
||||
|
||||
#define NS_DSA_SIG_SIZE 41
|
||||
#define NS_DSA_MIN_SIZE 213
|
||||
#define NS_DSA_MAX_BYTES 405
|
||||
|
||||
#define NS_SIG_TYPE 0
|
||||
#define NS_SIG_ALG 2
|
||||
#define NS_SIG_LABELS 3
|
||||
#define NS_SIG_OTTL 4
|
||||
#define NS_SIG_EXPIR 8
|
||||
#define NS_SIG_SIGNED 12
|
||||
#define NS_SIG_FOOT 16
|
||||
#define NS_SIG_SIGNER 18
|
||||
#define NS_NXT_BITS 8
|
||||
#define NS_NXT_BIT_SET( n,p) (p[(n)/NS_NXT_BITS] |= (0x80>>((n)%NS_NXT_BITS)))
|
||||
#define NS_NXT_BIT_CLEAR(n,p) (p[(n)/NS_NXT_BITS] &= ~(0x80>>((n)%NS_NXT_BITS)))
|
||||
#define NS_NXT_BIT_ISSET(n,p) (p[(n)/NS_NXT_BITS] & (0x80>>((n)%NS_NXT_BITS)))
|
||||
#define NS_NXT_MAX 127
|
||||
|
||||
#define NS_OPT_DNSSEC_OK 0x8000U
|
||||
#define NS_OPT_NSID 3
|
||||
|
||||
#define NS_GET16(s, cp) (void)((s) = ns_get16(((cp)+=2)-2))
|
||||
#define NS_GET32(l, cp) (void)((l) = ns_get32(((cp)+=4)-4))
|
||||
#define NS_PUT16(s, cp) ns_put16((s), ((cp)+=2)-2)
|
||||
#define NS_PUT32(l, cp) ns_put32((l), ((cp)+=4)-4)
|
||||
|
||||
unsigned ns_get16(const unsigned char *);
|
||||
unsigned long ns_get32(const unsigned char *);
|
||||
void ns_put16(unsigned, unsigned char *);
|
||||
void ns_put32(unsigned long, unsigned char *);
|
||||
|
||||
int ns_initparse(const unsigned char *, int, ns_msg *);
|
||||
int ns_parserr(ns_msg *, ns_sect, int, ns_rr *);
|
||||
int ns_skiprr(const unsigned char *, const unsigned char *, ns_sect, int);
|
||||
int ns_name_uncompress(const unsigned char *, const unsigned char *, const unsigned char *, char *, size_t);
|
||||
|
||||
|
||||
#define __BIND 19950621
|
||||
|
||||
typedef struct {
|
||||
unsigned id :16;
|
||||
#if __BYTE_ORDER == __BIG_ENDIAN
|
||||
unsigned qr: 1;
|
||||
unsigned opcode: 4;
|
||||
unsigned aa: 1;
|
||||
unsigned tc: 1;
|
||||
unsigned rd: 1;
|
||||
unsigned ra: 1;
|
||||
unsigned unused :1;
|
||||
unsigned ad: 1;
|
||||
unsigned cd: 1;
|
||||
unsigned rcode :4;
|
||||
#else
|
||||
unsigned rd :1;
|
||||
unsigned tc :1;
|
||||
unsigned aa :1;
|
||||
unsigned opcode :4;
|
||||
unsigned qr :1;
|
||||
unsigned rcode :4;
|
||||
unsigned cd: 1;
|
||||
unsigned ad: 1;
|
||||
unsigned unused :1;
|
||||
unsigned ra :1;
|
||||
#endif
|
||||
unsigned qdcount :16;
|
||||
unsigned ancount :16;
|
||||
unsigned nscount :16;
|
||||
unsigned arcount :16;
|
||||
} HEADER;
|
||||
|
||||
#define PACKETSZ NS_PACKETSZ
|
||||
#define MAXDNAME NS_MAXDNAME
|
||||
#define MAXCDNAME NS_MAXCDNAME
|
||||
#define MAXLABEL NS_MAXLABEL
|
||||
#define HFIXEDSZ NS_HFIXEDSZ
|
||||
#define QFIXEDSZ NS_QFIXEDSZ
|
||||
#define RRFIXEDSZ NS_RRFIXEDSZ
|
||||
#define INT32SZ NS_INT32SZ
|
||||
#define INT16SZ NS_INT16SZ
|
||||
#define INT8SZ NS_INT8SZ
|
||||
#define INADDRSZ NS_INADDRSZ
|
||||
#define IN6ADDRSZ NS_IN6ADDRSZ
|
||||
#define INDIR_MASK NS_CMPRSFLGS
|
||||
#define NAMESERVER_PORT NS_DEFAULTPORT
|
||||
|
||||
#define S_ZONE ns_s_zn
|
||||
#define S_PREREQ ns_s_pr
|
||||
#define S_UPDATE ns_s_ud
|
||||
#define S_ADDT ns_s_ar
|
||||
|
||||
#define QUERY ns_o_query
|
||||
#define IQUERY ns_o_iquery
|
||||
#define STATUS ns_o_status
|
||||
#define NS_NOTIFY_OP ns_o_notify
|
||||
#define NS_UPDATE_OP ns_o_update
|
||||
|
||||
#define NOERROR ns_r_noerror
|
||||
#define FORMERR ns_r_formerr
|
||||
#define SERVFAIL ns_r_servfail
|
||||
#define NXDOMAIN ns_r_nxdomain
|
||||
#define NOTIMP ns_r_notimpl
|
||||
#define REFUSED ns_r_refused
|
||||
#define YXDOMAIN ns_r_yxdomain
|
||||
#define YXRRSET ns_r_yxrrset
|
||||
#define NXRRSET ns_r_nxrrset
|
||||
#define NOTAUTH ns_r_notauth
|
||||
#define NOTZONE ns_r_notzone
|
||||
|
||||
#define DELETE ns_uop_delete
|
||||
#define ADD ns_uop_add
|
||||
|
||||
#define T_A ns_t_a
|
||||
#define T_NS ns_t_ns
|
||||
#define T_MD ns_t_md
|
||||
#define T_MF ns_t_mf
|
||||
#define T_CNAME ns_t_cname
|
||||
#define T_SOA ns_t_soa
|
||||
#define T_MB ns_t_mb
|
||||
#define T_MG ns_t_mg
|
||||
#define T_MR ns_t_mr
|
||||
#define T_NULL ns_t_null
|
||||
#define T_WKS ns_t_wks
|
||||
#define T_PTR ns_t_ptr
|
||||
#define T_HINFO ns_t_hinfo
|
||||
#define T_MINFO ns_t_minfo
|
||||
#define T_MX ns_t_mx
|
||||
#define T_TXT ns_t_txt
|
||||
#define T_RP ns_t_rp
|
||||
#define T_AFSDB ns_t_afsdb
|
||||
#define T_X25 ns_t_x25
|
||||
#define T_ISDN ns_t_isdn
|
||||
#define T_RT ns_t_rt
|
||||
#define T_NSAP ns_t_nsap
|
||||
#define T_NSAP_PTR ns_t_nsap_ptr
|
||||
#define T_SIG ns_t_sig
|
||||
#define T_KEY ns_t_key
|
||||
#define T_PX ns_t_px
|
||||
#define T_GPOS ns_t_gpos
|
||||
#define T_AAAA ns_t_aaaa
|
||||
#define T_LOC ns_t_loc
|
||||
#define T_NXT ns_t_nxt
|
||||
#define T_EID ns_t_eid
|
||||
#define T_NIMLOC ns_t_nimloc
|
||||
#define T_SRV ns_t_srv
|
||||
#define T_ATMA ns_t_atma
|
||||
#define T_NAPTR ns_t_naptr
|
||||
#define T_A6 ns_t_a6
|
||||
#define T_DNAME ns_t_dname
|
||||
#define T_TSIG ns_t_tsig
|
||||
#define T_IXFR ns_t_ixfr
|
||||
#define T_AXFR ns_t_axfr
|
||||
#define T_MAILB ns_t_mailb
|
||||
#define T_MAILA ns_t_maila
|
||||
#define T_ANY ns_t_any
|
||||
|
||||
#define C_IN ns_c_in
|
||||
#define C_CHAOS ns_c_chaos
|
||||
#define C_HS ns_c_hs
|
||||
#define C_NONE ns_c_none
|
||||
#define C_ANY ns_c_any
|
||||
|
||||
#define GETSHORT NS_GET16
|
||||
#define GETLONG NS_GET32
|
||||
#define PUTSHORT NS_PUT16
|
||||
#define PUTLONG NS_PUT32
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,2 @@
|
||||
#include <arpa/nameser.h>
|
||||
|
||||
@@ -0,0 +1,251 @@
|
||||
#ifndef _ARPA_TELNET_H
|
||||
#define _ARPA_TELNET_H
|
||||
|
||||
#define IAC 255
|
||||
#define DONT 254
|
||||
#define DO 253
|
||||
#define WONT 252
|
||||
#define WILL 251
|
||||
#define SB 250
|
||||
#define GA 249
|
||||
#define EL 248
|
||||
#define EC 247
|
||||
#define AYT 246
|
||||
#define AO 245
|
||||
#define IP 244
|
||||
#define BREAK 243
|
||||
#define DM 242
|
||||
#define NOP 241
|
||||
#define SE 240
|
||||
#define EOR 239
|
||||
#define ABORT 238
|
||||
#define SUSP 237
|
||||
#define xEOF 236
|
||||
|
||||
#define SYNCH 242
|
||||
|
||||
#define telcmds ((char [][6]){ "EOF", "SUSP", "ABORT", "EOR", "SE", "NOP", "DMARK", "BRK", "IP", "AO", "AYT", "EC", "EL", "GA", "SB", "WILL", "WONT", "DO", "DONT", "IAC", 0 })
|
||||
|
||||
#define TELCMD_FIRST xEOF
|
||||
#define TELCMD_LAST IAC
|
||||
#define TELCMD_OK(x) ((unsigned int)(x) <= TELCMD_LAST && \
|
||||
(unsigned int)(x) >= TELCMD_FIRST)
|
||||
#define TELCMD(x) telcmds[(x)-TELCMD_FIRST]
|
||||
|
||||
#define TELOPT_BINARY 0
|
||||
#define TELOPT_ECHO 1
|
||||
#define TELOPT_RCP 2
|
||||
#define TELOPT_SGA 3
|
||||
#define TELOPT_NAMS 4
|
||||
#define TELOPT_STATUS 5
|
||||
#define TELOPT_TM 6
|
||||
#define TELOPT_RCTE 7
|
||||
#define TELOPT_NAOL 8
|
||||
#define TELOPT_NAOP 9
|
||||
#define TELOPT_NAOCRD 10
|
||||
#define TELOPT_NAOHTS 11
|
||||
#define TELOPT_NAOHTD 12
|
||||
#define TELOPT_NAOFFD 13
|
||||
#define TELOPT_NAOVTS 14
|
||||
#define TELOPT_NAOVTD 15
|
||||
#define TELOPT_NAOLFD 16
|
||||
#define TELOPT_XASCII 17
|
||||
#define TELOPT_LOGOUT 18
|
||||
#define TELOPT_BM 19
|
||||
#define TELOPT_DET 20
|
||||
#define TELOPT_SUPDUP 21
|
||||
#define TELOPT_SUPDUPOUTPUT 22
|
||||
#define TELOPT_SNDLOC 23
|
||||
#define TELOPT_TTYPE 24
|
||||
#define TELOPT_EOR 25
|
||||
#define TELOPT_TUID 26
|
||||
#define TELOPT_OUTMRK 27
|
||||
#define TELOPT_TTYLOC 28
|
||||
#define TELOPT_3270REGIME 29
|
||||
#define TELOPT_X3PAD 30
|
||||
#define TELOPT_NAWS 31
|
||||
#define TELOPT_TSPEED 32
|
||||
#define TELOPT_LFLOW 33
|
||||
#define TELOPT_LINEMODE 34
|
||||
#define TELOPT_XDISPLOC 35
|
||||
#define TELOPT_OLD_ENVIRON 36
|
||||
#define TELOPT_AUTHENTICATION 37/* Authenticate */
|
||||
#define TELOPT_ENCRYPT 38
|
||||
#define TELOPT_NEW_ENVIRON 39
|
||||
#define TELOPT_EXOPL 255
|
||||
|
||||
|
||||
#define NTELOPTS (1+TELOPT_NEW_ENVIRON)
|
||||
#ifdef TELOPTS
|
||||
char *telopts[NTELOPTS+1] = {
|
||||
"BINARY", "ECHO", "RCP", "SUPPRESS GO AHEAD", "NAME",
|
||||
"STATUS", "TIMING MARK", "RCTE", "NAOL", "NAOP",
|
||||
"NAOCRD", "NAOHTS", "NAOHTD", "NAOFFD", "NAOVTS",
|
||||
"NAOVTD", "NAOLFD", "EXTEND ASCII", "LOGOUT", "BYTE MACRO",
|
||||
"DATA ENTRY TERMINAL", "SUPDUP", "SUPDUP OUTPUT",
|
||||
"SEND LOCATION", "TERMINAL TYPE", "END OF RECORD",
|
||||
"TACACS UID", "OUTPUT MARKING", "TTYLOC",
|
||||
"3270 REGIME", "X.3 PAD", "NAWS", "TSPEED", "LFLOW",
|
||||
"LINEMODE", "XDISPLOC", "OLD-ENVIRON", "AUTHENTICATION",
|
||||
"ENCRYPT", "NEW-ENVIRON",
|
||||
0,
|
||||
};
|
||||
#define TELOPT_FIRST TELOPT_BINARY
|
||||
#define TELOPT_LAST TELOPT_NEW_ENVIRON
|
||||
#define TELOPT_OK(x) ((unsigned int)(x) <= TELOPT_LAST)
|
||||
#define TELOPT(x) telopts[(x)-TELOPT_FIRST]
|
||||
#endif
|
||||
|
||||
#define TELQUAL_IS 0
|
||||
#define TELQUAL_SEND 1
|
||||
#define TELQUAL_INFO 2
|
||||
#define TELQUAL_REPLY 2
|
||||
#define TELQUAL_NAME 3
|
||||
|
||||
#define LFLOW_OFF 0
|
||||
#define LFLOW_ON 1
|
||||
#define LFLOW_RESTART_ANY 2
|
||||
#define LFLOW_RESTART_XON 3
|
||||
|
||||
|
||||
#define LM_MODE 1
|
||||
#define LM_FORWARDMASK 2
|
||||
#define LM_SLC 3
|
||||
|
||||
#define MODE_EDIT 0x01
|
||||
#define MODE_TRAPSIG 0x02
|
||||
#define MODE_ACK 0x04
|
||||
#define MODE_SOFT_TAB 0x08
|
||||
#define MODE_LIT_ECHO 0x10
|
||||
|
||||
#define MODE_MASK 0x1f
|
||||
|
||||
#define MODE_FLOW 0x0100
|
||||
#define MODE_ECHO 0x0200
|
||||
#define MODE_INBIN 0x0400
|
||||
#define MODE_OUTBIN 0x0800
|
||||
#define MODE_FORCE 0x1000
|
||||
|
||||
#define SLC_SYNCH 1
|
||||
#define SLC_BRK 2
|
||||
#define SLC_IP 3
|
||||
#define SLC_AO 4
|
||||
#define SLC_AYT 5
|
||||
#define SLC_EOR 6
|
||||
#define SLC_ABORT 7
|
||||
#define SLC_EOF 8
|
||||
#define SLC_SUSP 9
|
||||
#define SLC_EC 10
|
||||
#define SLC_EL 11
|
||||
#define SLC_EW 12
|
||||
#define SLC_RP 13
|
||||
#define SLC_LNEXT 14
|
||||
#define SLC_XON 15
|
||||
#define SLC_XOFF 16
|
||||
#define SLC_FORW1 17
|
||||
#define SLC_FORW2 18
|
||||
|
||||
#define NSLC 18
|
||||
|
||||
#define SLC_NAMELIST "0", "SYNCH", "BRK", "IP", "AO", "AYT", "EOR", \
|
||||
"ABORT", "EOF", "SUSP", "EC", "EL", "EW", "RP", \
|
||||
"LNEXT", "XON", "XOFF", "FORW1", "FORW2", 0,
|
||||
#ifdef SLC_NAMES
|
||||
char *slc_names[] = {
|
||||
SLC_NAMELIST
|
||||
};
|
||||
#else
|
||||
extern char *slc_names[];
|
||||
#define SLC_NAMES SLC_NAMELIST
|
||||
#endif
|
||||
|
||||
#define SLC_NAME_OK(x) ((unsigned int)(x) <= NSLC)
|
||||
#define SLC_NAME(x) slc_names[x]
|
||||
|
||||
#define SLC_NOSUPPORT 0
|
||||
#define SLC_CANTCHANGE 1
|
||||
#define SLC_VARIABLE 2
|
||||
#define SLC_DEFAULT 3
|
||||
#define SLC_LEVELBITS 0x03
|
||||
|
||||
#define SLC_FUNC 0
|
||||
#define SLC_FLAGS 1
|
||||
#define SLC_VALUE 2
|
||||
|
||||
#define SLC_ACK 0x80
|
||||
#define SLC_FLUSHIN 0x40
|
||||
#define SLC_FLUSHOUT 0x20
|
||||
|
||||
#define OLD_ENV_VAR 1
|
||||
#define OLD_ENV_VALUE 0
|
||||
#define NEW_ENV_VAR 0
|
||||
#define NEW_ENV_VALUE 1
|
||||
#define ENV_ESC 2
|
||||
#define ENV_USERVAR 3
|
||||
|
||||
#define AUTH_WHO_CLIENT 0
|
||||
#define AUTH_WHO_SERVER 1
|
||||
#define AUTH_WHO_MASK 1
|
||||
|
||||
#define AUTH_HOW_ONE_WAY 0
|
||||
#define AUTH_HOW_MUTUAL 2
|
||||
#define AUTH_HOW_MASK 2
|
||||
|
||||
#define AUTHTYPE_NULL 0
|
||||
#define AUTHTYPE_KERBEROS_V4 1
|
||||
#define AUTHTYPE_KERBEROS_V5 2
|
||||
#define AUTHTYPE_SPX 3
|
||||
#define AUTHTYPE_MINK 4
|
||||
#define AUTHTYPE_CNT 5
|
||||
|
||||
#define AUTHTYPE_TEST 99
|
||||
|
||||
#ifdef AUTH_NAMES
|
||||
char *authtype_names[] = {
|
||||
"NULL", "KERBEROS_V4", "KERBEROS_V5", "SPX", "MINK", 0,
|
||||
};
|
||||
#else
|
||||
extern char *authtype_names[];
|
||||
#endif
|
||||
|
||||
#define AUTHTYPE_NAME_OK(x) ((unsigned int)(x) < AUTHTYPE_CNT)
|
||||
#define AUTHTYPE_NAME(x) authtype_names[x]
|
||||
|
||||
#define ENCRYPT_IS 0
|
||||
#define ENCRYPT_SUPPORT 1
|
||||
#define ENCRYPT_REPLY 2
|
||||
#define ENCRYPT_START 3
|
||||
#define ENCRYPT_END 4
|
||||
#define ENCRYPT_REQSTART 5
|
||||
#define ENCRYPT_REQEND 6
|
||||
#define ENCRYPT_ENC_KEYID 7
|
||||
#define ENCRYPT_DEC_KEYID 8
|
||||
#define ENCRYPT_CNT 9
|
||||
|
||||
#define ENCTYPE_ANY 0
|
||||
#define ENCTYPE_DES_CFB64 1
|
||||
#define ENCTYPE_DES_OFB64 2
|
||||
#define ENCTYPE_CNT 3
|
||||
|
||||
#ifdef ENCRYPT_NAMES
|
||||
char *encrypt_names[] = {
|
||||
"IS", "SUPPORT", "REPLY", "START", "END",
|
||||
"REQUEST-START", "REQUEST-END", "ENC-KEYID", "DEC-KEYID",
|
||||
0,
|
||||
};
|
||||
char *enctype_names[] = {
|
||||
"ANY", "DES_CFB64", "DES_OFB64", 0,
|
||||
};
|
||||
#else
|
||||
extern char *encrypt_names[];
|
||||
extern char *enctype_names[];
|
||||
#endif
|
||||
|
||||
|
||||
#define ENCRYPT_NAME_OK(x) ((unsigned int)(x) < ENCRYPT_CNT)
|
||||
#define ENCRYPT_NAME(x) encrypt_names[x]
|
||||
|
||||
#define ENCTYPE_NAME_OK(x) ((unsigned int)(x) < ENCTYPE_CNT)
|
||||
#define ENCTYPE_NAME(x) enctype_names[x]
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,31 @@
|
||||
#ifndef _ARPA_TFTP_H
|
||||
#define _ARPA_TFTP_H
|
||||
#define SEGSIZE 512
|
||||
#define RRQ 01
|
||||
#define WRQ 02
|
||||
#define DATA 03
|
||||
#define ACK 04
|
||||
#define ERROR 05
|
||||
struct tftphdr {
|
||||
short th_opcode;
|
||||
union {
|
||||
unsigned short tu_block;
|
||||
short tu_code;
|
||||
char tu_stuff[1];
|
||||
} th_u;
|
||||
char th_data[1];
|
||||
};
|
||||
#define th_block th_u.tu_block
|
||||
#define th_code th_u.tu_code
|
||||
#define th_stuff th_u.tu_stuff
|
||||
#define th_msg th_data
|
||||
#define EUNDEF 0
|
||||
#define ENOTFOUND 1
|
||||
#define EACCESS 2
|
||||
#define ENOSPACE 3
|
||||
#define EBADOP 4
|
||||
#define EBADID 5
|
||||
#define EEXISTS 6
|
||||
#define ENOUSER 7
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
#include <features.h>
|
||||
|
||||
#undef assert
|
||||
|
||||
#ifdef NDEBUG
|
||||
#define assert(x) (void)0
|
||||
#else
|
||||
#define assert(x) ((void)((x) || (__assert_fail(#x, __FILE__, __LINE__, __func__),0)))
|
||||
#endif
|
||||
|
||||
#if __STDC_VERSION__ >= 201112L && !defined(__cplusplus)
|
||||
#define static_assert _Static_assert
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
_Noreturn void __assert_fail (const char *, const char *, int, const char *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,26 @@
|
||||
#ifndef _BYTESWAP_H
|
||||
#define _BYTESWAP_H
|
||||
|
||||
#include <features.h>
|
||||
#include <stdint.h>
|
||||
|
||||
static __inline uint16_t __bswap_16(uint16_t __x)
|
||||
{
|
||||
return __x<<8 | __x>>8;
|
||||
}
|
||||
|
||||
static __inline uint32_t __bswap_32(uint32_t __x)
|
||||
{
|
||||
return __x>>24 | __x>>8&0xff00 | __x<<8&0xff0000 | __x<<24;
|
||||
}
|
||||
|
||||
static __inline uint64_t __bswap_64(uint64_t __x)
|
||||
{
|
||||
return __bswap_32(__x)+0ULL<<32 | __bswap_32(__x>>32);
|
||||
}
|
||||
|
||||
#define bswap_16(x) __bswap_16(x)
|
||||
#define bswap_32(x) __bswap_32(x)
|
||||
#define bswap_64(x) __bswap_64(x)
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,133 @@
|
||||
#ifndef _COMPLEX_H
|
||||
#define _COMPLEX_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define complex _Complex
|
||||
#ifdef __GNUC__
|
||||
#define _Complex_I (__extension__ (0.0f+1.0fi))
|
||||
#else
|
||||
#define _Complex_I (0.0f+1.0fi)
|
||||
#endif
|
||||
#define I _Complex_I
|
||||
|
||||
double complex cacos(double complex);
|
||||
float complex cacosf(float complex);
|
||||
long double complex cacosl(long double complex);
|
||||
|
||||
double complex casin(double complex);
|
||||
float complex casinf(float complex);
|
||||
long double complex casinl(long double complex);
|
||||
|
||||
double complex catan(double complex);
|
||||
float complex catanf(float complex);
|
||||
long double complex catanl(long double complex);
|
||||
|
||||
double complex ccos(double complex);
|
||||
float complex ccosf(float complex);
|
||||
long double complex ccosl(long double complex);
|
||||
|
||||
double complex csin(double complex);
|
||||
float complex csinf(float complex);
|
||||
long double complex csinl(long double complex);
|
||||
|
||||
double complex ctan(double complex);
|
||||
float complex ctanf(float complex);
|
||||
long double complex ctanl(long double complex);
|
||||
|
||||
double complex cacosh(double complex);
|
||||
float complex cacoshf(float complex);
|
||||
long double complex cacoshl(long double complex);
|
||||
|
||||
double complex casinh(double complex);
|
||||
float complex casinhf(float complex);
|
||||
long double complex casinhl(long double complex);
|
||||
|
||||
double complex catanh(double complex);
|
||||
float complex catanhf(float complex);
|
||||
long double complex catanhl(long double complex);
|
||||
|
||||
double complex ccosh(double complex);
|
||||
float complex ccoshf(float complex);
|
||||
long double complex ccoshl(long double complex);
|
||||
|
||||
double complex csinh(double complex);
|
||||
float complex csinhf(float complex);
|
||||
long double complex csinhl(long double complex);
|
||||
|
||||
double complex ctanh(double complex);
|
||||
float complex ctanhf(float complex);
|
||||
long double complex ctanhl(long double complex);
|
||||
|
||||
double complex cexp(double complex);
|
||||
float complex cexpf(float complex);
|
||||
long double complex cexpl(long double complex);
|
||||
|
||||
double complex clog(double complex);
|
||||
float complex clogf(float complex);
|
||||
long double complex clogl(long double complex);
|
||||
|
||||
double cabs(double complex);
|
||||
float cabsf(float complex);
|
||||
long double cabsl(long double complex);
|
||||
|
||||
double complex cpow(double complex, double complex);
|
||||
float complex cpowf(float complex, float complex);
|
||||
long double complex cpowl(long double complex, long double complex);
|
||||
|
||||
double complex csqrt(double complex);
|
||||
float complex csqrtf(float complex);
|
||||
long double complex csqrtl(long double complex);
|
||||
|
||||
double carg(double complex);
|
||||
float cargf(float complex);
|
||||
long double cargl(long double complex);
|
||||
|
||||
double cimag(double complex);
|
||||
float cimagf(float complex);
|
||||
long double cimagl(long double complex);
|
||||
|
||||
double complex conj(double complex);
|
||||
float complex conjf(float complex);
|
||||
long double complex conjl(long double complex);
|
||||
|
||||
double complex cproj(double complex);
|
||||
float complex cprojf(float complex);
|
||||
long double complex cprojl(long double complex);
|
||||
|
||||
double creal(double complex);
|
||||
float crealf(float complex);
|
||||
long double creall(long double complex);
|
||||
|
||||
#ifndef __cplusplus
|
||||
#define __CIMAG(x, t) \
|
||||
(+(union { _Complex t __z; t __xy[2]; }){(_Complex t)(x)}.__xy[1])
|
||||
|
||||
#define creal(x) ((double)(x))
|
||||
#define crealf(x) ((float)(x))
|
||||
#define creall(x) ((long double)(x))
|
||||
|
||||
#define cimag(x) __CIMAG(x, double)
|
||||
#define cimagf(x) __CIMAG(x, float)
|
||||
#define cimagl(x) __CIMAG(x, long double)
|
||||
#endif
|
||||
|
||||
#if __STDC_VERSION__ >= 201112L
|
||||
#if defined(_Imaginary_I)
|
||||
#define __CMPLX(x, y, t) ((t)(x) + _Imaginary_I*(t)(y))
|
||||
#elif defined(__clang__)
|
||||
#define __CMPLX(x, y, t) (+(_Complex t){ (t)(x), (t)(y) })
|
||||
#else
|
||||
#define __CMPLX(x, y, t) (__builtin_complex((t)(x), (t)(y)))
|
||||
#endif
|
||||
#define CMPLX(x, y) __CMPLX(x, y, double)
|
||||
#define CMPLXF(x, y) __CMPLX(x, y, float)
|
||||
#define CMPLXL(x, y) __CMPLX(x, y, long double)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
@@ -0,0 +1,29 @@
|
||||
#ifndef _CPIO_H
|
||||
#define _CPIO_H
|
||||
|
||||
#define MAGIC "070707"
|
||||
|
||||
#define C_IRUSR 000400
|
||||
#define C_IWUSR 000200
|
||||
#define C_IXUSR 000100
|
||||
#define C_IRGRP 000040
|
||||
#define C_IWGRP 000020
|
||||
#define C_IXGRP 000010
|
||||
#define C_IROTH 000004
|
||||
#define C_IWOTH 000002
|
||||
#define C_IXOTH 000001
|
||||
|
||||
#define C_ISUID 004000
|
||||
#define C_ISGID 002000
|
||||
#define C_ISVTX 001000
|
||||
|
||||
#define C_ISBLK 060000
|
||||
#define C_ISCHR 020000
|
||||
#define C_ISDIR 040000
|
||||
#define C_ISFIFO 010000
|
||||
#define C_ISSOCK 0140000
|
||||
#define C_ISLNK 0120000
|
||||
#define C_ISCTG 0110000
|
||||
#define C_ISREG 0100000
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,20 @@
|
||||
#ifndef _CRYPT_H
|
||||
#define _CRYPT_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct crypt_data {
|
||||
int initialized;
|
||||
char __buf[256];
|
||||
};
|
||||
|
||||
char *crypt(const char *, const char *);
|
||||
char *crypt_r(const char *, const char *, struct crypt_data *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,75 @@
|
||||
#ifndef _CTYPE_H
|
||||
#define _CTYPE_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <features.h>
|
||||
|
||||
int isalnum(int);
|
||||
int isalpha(int);
|
||||
int isblank(int);
|
||||
int iscntrl(int);
|
||||
int isdigit(int);
|
||||
int isgraph(int);
|
||||
int islower(int);
|
||||
int isprint(int);
|
||||
int ispunct(int);
|
||||
int isspace(int);
|
||||
int isupper(int);
|
||||
int isxdigit(int);
|
||||
int tolower(int);
|
||||
int toupper(int);
|
||||
|
||||
#ifndef __cplusplus
|
||||
static __inline int __isspace(int _c)
|
||||
{
|
||||
return _c == ' ' || (unsigned)_c-'\t' < 5;
|
||||
}
|
||||
|
||||
#define isalpha(a) (0 ? isalpha(a) : (((unsigned)(a)|32)-'a') < 26)
|
||||
#define isdigit(a) (0 ? isdigit(a) : ((unsigned)(a)-'0') < 10)
|
||||
#define islower(a) (0 ? islower(a) : ((unsigned)(a)-'a') < 26)
|
||||
#define isupper(a) (0 ? isupper(a) : ((unsigned)(a)-'A') < 26)
|
||||
#define isprint(a) (0 ? isprint(a) : ((unsigned)(a)-0x20) < 0x5f)
|
||||
#define isgraph(a) (0 ? isgraph(a) : ((unsigned)(a)-0x21) < 0x5e)
|
||||
#define isspace(a) __isspace(a)
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
|
||||
|| defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
|
||||
|| defined(_BSD_SOURCE)
|
||||
|
||||
#define __NEED_locale_t
|
||||
#include <bits/alltypes.h>
|
||||
|
||||
int isalnum_l(int, locale_t);
|
||||
int isalpha_l(int, locale_t);
|
||||
int isblank_l(int, locale_t);
|
||||
int iscntrl_l(int, locale_t);
|
||||
int isdigit_l(int, locale_t);
|
||||
int isgraph_l(int, locale_t);
|
||||
int islower_l(int, locale_t);
|
||||
int isprint_l(int, locale_t);
|
||||
int ispunct_l(int, locale_t);
|
||||
int isspace_l(int, locale_t);
|
||||
int isupper_l(int, locale_t);
|
||||
int isxdigit_l(int, locale_t);
|
||||
int tolower_l(int, locale_t);
|
||||
int toupper_l(int, locale_t);
|
||||
|
||||
int isascii(int);
|
||||
int toascii(int);
|
||||
#define _tolower(a) ((a)|0x20)
|
||||
#define _toupper(a) ((a)&0x5f)
|
||||
#define isascii(a) (0 ? isascii(a) : (unsigned)(a) < 128)
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,85 @@
|
||||
#ifndef _DIRENT_H
|
||||
#define _DIRENT_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <features.h>
|
||||
|
||||
#define __NEED_ino_t
|
||||
#define __NEED_off_t
|
||||
#if defined(_BSD_SOURCE) || defined(_GNU_SOURCE)
|
||||
#define __NEED_size_t
|
||||
#endif
|
||||
|
||||
#include <bits/alltypes.h>
|
||||
|
||||
typedef struct __dirstream DIR;
|
||||
|
||||
#define _DIRENT_HAVE_D_RECLEN
|
||||
#define _DIRENT_HAVE_D_OFF
|
||||
#define _DIRENT_HAVE_D_TYPE
|
||||
|
||||
struct dirent {
|
||||
ino_t d_ino;
|
||||
off_t d_off;
|
||||
unsigned short d_reclen;
|
||||
unsigned char d_type;
|
||||
char d_name[256];
|
||||
};
|
||||
|
||||
#define d_fileno d_ino
|
||||
|
||||
int closedir(DIR *);
|
||||
DIR *fdopendir(int);
|
||||
DIR *opendir(const char *);
|
||||
struct dirent *readdir(DIR *);
|
||||
int readdir_r(DIR *__restrict, struct dirent *__restrict, struct dirent **__restrict);
|
||||
void rewinddir(DIR *);
|
||||
int dirfd(DIR *);
|
||||
|
||||
int alphasort(const struct dirent **, const struct dirent **);
|
||||
int scandir(const char *, struct dirent ***, int (*)(const struct dirent *), int (*)(const struct dirent **, const struct dirent **));
|
||||
|
||||
#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
||||
void seekdir(DIR *, long);
|
||||
long telldir(DIR *);
|
||||
#endif
|
||||
|
||||
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
||||
#define DT_UNKNOWN 0
|
||||
#define DT_FIFO 1
|
||||
#define DT_CHR 2
|
||||
#define DT_DIR 4
|
||||
#define DT_BLK 6
|
||||
#define DT_REG 8
|
||||
#define DT_LNK 10
|
||||
#define DT_SOCK 12
|
||||
#define DT_WHT 14
|
||||
#define IFTODT(x) ((x)>>12 & 017)
|
||||
#define DTTOIF(x) ((x)<<12)
|
||||
int getdents(int, struct dirent *, size_t);
|
||||
#endif
|
||||
|
||||
#ifdef _GNU_SOURCE
|
||||
int versionsort(const struct dirent **, const struct dirent **);
|
||||
#endif
|
||||
|
||||
#if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
|
||||
#define dirent64 dirent
|
||||
#define readdir64 readdir
|
||||
#define readdir64_r readdir_r
|
||||
#define scandir64 scandir
|
||||
#define alphasort64 alphasort
|
||||
#define versionsort64 versionsort
|
||||
#define off64_t off_t
|
||||
#define ino64_t ino_t
|
||||
#define getdents64 getdents
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,42 @@
|
||||
#ifndef _DLFCN_H
|
||||
#define _DLFCN_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <features.h>
|
||||
|
||||
#define RTLD_LAZY 1
|
||||
#define RTLD_NOW 2
|
||||
#define RTLD_NOLOAD 4
|
||||
#define RTLD_NODELETE 4096
|
||||
#define RTLD_GLOBAL 256
|
||||
#define RTLD_LOCAL 0
|
||||
|
||||
#define RTLD_NEXT ((void *)-1)
|
||||
#define RTLD_DEFAULT ((void *)0)
|
||||
|
||||
#define RTLD_DI_LINKMAP 2
|
||||
|
||||
int dlclose(void *);
|
||||
char *dlerror(void);
|
||||
void *dlopen(const char *, int);
|
||||
void *dlsym(void *__restrict, const char *__restrict);
|
||||
|
||||
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
||||
typedef struct {
|
||||
const char *dli_fname;
|
||||
void *dli_fbase;
|
||||
const char *dli_sname;
|
||||
void *dli_saddr;
|
||||
} Dl_info;
|
||||
int dladdr(const void *, Dl_info *);
|
||||
int dlinfo(void *, int, void *);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,3292 @@
|
||||
#ifndef _ELF_H
|
||||
#define _ELF_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
typedef uint16_t Elf32_Half;
|
||||
typedef uint16_t Elf64_Half;
|
||||
|
||||
typedef uint32_t Elf32_Word;
|
||||
typedef int32_t Elf32_Sword;
|
||||
typedef uint32_t Elf64_Word;
|
||||
typedef int32_t Elf64_Sword;
|
||||
|
||||
typedef uint64_t Elf32_Xword;
|
||||
typedef int64_t Elf32_Sxword;
|
||||
typedef uint64_t Elf64_Xword;
|
||||
typedef int64_t Elf64_Sxword;
|
||||
|
||||
typedef uint32_t Elf32_Addr;
|
||||
typedef uint64_t Elf64_Addr;
|
||||
|
||||
typedef uint32_t Elf32_Off;
|
||||
typedef uint64_t Elf64_Off;
|
||||
|
||||
typedef uint16_t Elf32_Section;
|
||||
typedef uint16_t Elf64_Section;
|
||||
|
||||
typedef Elf32_Half Elf32_Versym;
|
||||
typedef Elf64_Half Elf64_Versym;
|
||||
|
||||
#define EI_NIDENT (16)
|
||||
|
||||
typedef struct {
|
||||
unsigned char e_ident[EI_NIDENT];
|
||||
Elf32_Half e_type;
|
||||
Elf32_Half e_machine;
|
||||
Elf32_Word e_version;
|
||||
Elf32_Addr e_entry;
|
||||
Elf32_Off e_phoff;
|
||||
Elf32_Off e_shoff;
|
||||
Elf32_Word e_flags;
|
||||
Elf32_Half e_ehsize;
|
||||
Elf32_Half e_phentsize;
|
||||
Elf32_Half e_phnum;
|
||||
Elf32_Half e_shentsize;
|
||||
Elf32_Half e_shnum;
|
||||
Elf32_Half e_shstrndx;
|
||||
} Elf32_Ehdr;
|
||||
|
||||
typedef struct {
|
||||
unsigned char e_ident[EI_NIDENT];
|
||||
Elf64_Half e_type;
|
||||
Elf64_Half e_machine;
|
||||
Elf64_Word e_version;
|
||||
Elf64_Addr e_entry;
|
||||
Elf64_Off e_phoff;
|
||||
Elf64_Off e_shoff;
|
||||
Elf64_Word e_flags;
|
||||
Elf64_Half e_ehsize;
|
||||
Elf64_Half e_phentsize;
|
||||
Elf64_Half e_phnum;
|
||||
Elf64_Half e_shentsize;
|
||||
Elf64_Half e_shnum;
|
||||
Elf64_Half e_shstrndx;
|
||||
} Elf64_Ehdr;
|
||||
|
||||
#define EI_MAG0 0
|
||||
#define ELFMAG0 0x7f
|
||||
|
||||
#define EI_MAG1 1
|
||||
#define ELFMAG1 'E'
|
||||
|
||||
#define EI_MAG2 2
|
||||
#define ELFMAG2 'L'
|
||||
|
||||
#define EI_MAG3 3
|
||||
#define ELFMAG3 'F'
|
||||
|
||||
|
||||
#define ELFMAG "\177ELF"
|
||||
#define SELFMAG 4
|
||||
|
||||
#define EI_CLASS 4
|
||||
#define ELFCLASSNONE 0
|
||||
#define ELFCLASS32 1
|
||||
#define ELFCLASS64 2
|
||||
#define ELFCLASSNUM 3
|
||||
|
||||
#define EI_DATA 5
|
||||
#define ELFDATANONE 0
|
||||
#define ELFDATA2LSB 1
|
||||
#define ELFDATA2MSB 2
|
||||
#define ELFDATANUM 3
|
||||
|
||||
#define EI_VERSION 6
|
||||
|
||||
|
||||
#define EI_OSABI 7
|
||||
#define ELFOSABI_NONE 0
|
||||
#define ELFOSABI_SYSV 0
|
||||
#define ELFOSABI_HPUX 1
|
||||
#define ELFOSABI_NETBSD 2
|
||||
#define ELFOSABI_LINUX 3
|
||||
#define ELFOSABI_GNU 3
|
||||
#define ELFOSABI_SOLARIS 6
|
||||
#define ELFOSABI_AIX 7
|
||||
#define ELFOSABI_IRIX 8
|
||||
#define ELFOSABI_FREEBSD 9
|
||||
#define ELFOSABI_TRU64 10
|
||||
#define ELFOSABI_MODESTO 11
|
||||
#define ELFOSABI_OPENBSD 12
|
||||
#define ELFOSABI_ARM 97
|
||||
#define ELFOSABI_STANDALONE 255
|
||||
|
||||
#define EI_ABIVERSION 8
|
||||
|
||||
#define EI_PAD 9
|
||||
|
||||
|
||||
|
||||
#define ET_NONE 0
|
||||
#define ET_REL 1
|
||||
#define ET_EXEC 2
|
||||
#define ET_DYN 3
|
||||
#define ET_CORE 4
|
||||
#define ET_NUM 5
|
||||
#define ET_LOOS 0xfe00
|
||||
#define ET_HIOS 0xfeff
|
||||
#define ET_LOPROC 0xff00
|
||||
#define ET_HIPROC 0xffff
|
||||
|
||||
|
||||
|
||||
#define EM_NONE 0
|
||||
#define EM_M32 1
|
||||
#define EM_SPARC 2
|
||||
#define EM_386 3
|
||||
#define EM_68K 4
|
||||
#define EM_88K 5
|
||||
#define EM_860 7
|
||||
#define EM_MIPS 8
|
||||
#define EM_S370 9
|
||||
#define EM_MIPS_RS3_LE 10
|
||||
|
||||
#define EM_PARISC 15
|
||||
#define EM_VPP500 17
|
||||
#define EM_SPARC32PLUS 18
|
||||
#define EM_960 19
|
||||
#define EM_PPC 20
|
||||
#define EM_PPC64 21
|
||||
#define EM_S390 22
|
||||
|
||||
#define EM_V800 36
|
||||
#define EM_FR20 37
|
||||
#define EM_RH32 38
|
||||
#define EM_RCE 39
|
||||
#define EM_ARM 40
|
||||
#define EM_FAKE_ALPHA 41
|
||||
#define EM_SH 42
|
||||
#define EM_SPARCV9 43
|
||||
#define EM_TRICORE 44
|
||||
#define EM_ARC 45
|
||||
#define EM_H8_300 46
|
||||
#define EM_H8_300H 47
|
||||
#define EM_H8S 48
|
||||
#define EM_H8_500 49
|
||||
#define EM_IA_64 50
|
||||
#define EM_MIPS_X 51
|
||||
#define EM_COLDFIRE 52
|
||||
#define EM_68HC12 53
|
||||
#define EM_MMA 54
|
||||
#define EM_PCP 55
|
||||
#define EM_NCPU 56
|
||||
#define EM_NDR1 57
|
||||
#define EM_STARCORE 58
|
||||
#define EM_ME16 59
|
||||
#define EM_ST100 60
|
||||
#define EM_TINYJ 61
|
||||
#define EM_X86_64 62
|
||||
#define EM_PDSP 63
|
||||
|
||||
#define EM_FX66 66
|
||||
#define EM_ST9PLUS 67
|
||||
#define EM_ST7 68
|
||||
#define EM_68HC16 69
|
||||
#define EM_68HC11 70
|
||||
#define EM_68HC08 71
|
||||
#define EM_68HC05 72
|
||||
#define EM_SVX 73
|
||||
#define EM_ST19 74
|
||||
#define EM_VAX 75
|
||||
#define EM_CRIS 76
|
||||
#define EM_JAVELIN 77
|
||||
#define EM_FIREPATH 78
|
||||
#define EM_ZSP 79
|
||||
#define EM_MMIX 80
|
||||
#define EM_HUANY 81
|
||||
#define EM_PRISM 82
|
||||
#define EM_AVR 83
|
||||
#define EM_FR30 84
|
||||
#define EM_D10V 85
|
||||
#define EM_D30V 86
|
||||
#define EM_V850 87
|
||||
#define EM_M32R 88
|
||||
#define EM_MN10300 89
|
||||
#define EM_MN10200 90
|
||||
#define EM_PJ 91
|
||||
#define EM_OR1K 92
|
||||
#define EM_OPENRISC 92
|
||||
#define EM_ARC_A5 93
|
||||
#define EM_ARC_COMPACT 93
|
||||
#define EM_XTENSA 94
|
||||
#define EM_VIDEOCORE 95
|
||||
#define EM_TMM_GPP 96
|
||||
#define EM_NS32K 97
|
||||
#define EM_TPC 98
|
||||
#define EM_SNP1K 99
|
||||
#define EM_ST200 100
|
||||
#define EM_IP2K 101
|
||||
#define EM_MAX 102
|
||||
#define EM_CR 103
|
||||
#define EM_F2MC16 104
|
||||
#define EM_MSP430 105
|
||||
#define EM_BLACKFIN 106
|
||||
#define EM_SE_C33 107
|
||||
#define EM_SEP 108
|
||||
#define EM_ARCA 109
|
||||
#define EM_UNICORE 110
|
||||
#define EM_EXCESS 111
|
||||
#define EM_DXP 112
|
||||
#define EM_ALTERA_NIOS2 113
|
||||
#define EM_CRX 114
|
||||
#define EM_XGATE 115
|
||||
#define EM_C166 116
|
||||
#define EM_M16C 117
|
||||
#define EM_DSPIC30F 118
|
||||
#define EM_CE 119
|
||||
#define EM_M32C 120
|
||||
#define EM_TSK3000 131
|
||||
#define EM_RS08 132
|
||||
#define EM_SHARC 133
|
||||
#define EM_ECOG2 134
|
||||
#define EM_SCORE7 135
|
||||
#define EM_DSP24 136
|
||||
#define EM_VIDEOCORE3 137
|
||||
#define EM_LATTICEMICO32 138
|
||||
#define EM_SE_C17 139
|
||||
#define EM_TI_C6000 140
|
||||
#define EM_TI_C2000 141
|
||||
#define EM_TI_C5500 142
|
||||
#define EM_TI_ARP32 143
|
||||
#define EM_TI_PRU 144
|
||||
#define EM_MMDSP_PLUS 160
|
||||
#define EM_CYPRESS_M8C 161
|
||||
#define EM_R32C 162
|
||||
#define EM_TRIMEDIA 163
|
||||
#define EM_QDSP6 164
|
||||
#define EM_8051 165
|
||||
#define EM_STXP7X 166
|
||||
#define EM_NDS32 167
|
||||
#define EM_ECOG1X 168
|
||||
#define EM_MAXQ30 169
|
||||
#define EM_XIMO16 170
|
||||
#define EM_MANIK 171
|
||||
#define EM_CRAYNV2 172
|
||||
#define EM_RX 173
|
||||
#define EM_METAG 174
|
||||
#define EM_MCST_ELBRUS 175
|
||||
#define EM_ECOG16 176
|
||||
#define EM_CR16 177
|
||||
#define EM_ETPU 178
|
||||
#define EM_SLE9X 179
|
||||
#define EM_L10M 180
|
||||
#define EM_K10M 181
|
||||
#define EM_AARCH64 183
|
||||
#define EM_AVR32 185
|
||||
#define EM_STM8 186
|
||||
#define EM_TILE64 187
|
||||
#define EM_TILEPRO 188
|
||||
#define EM_MICROBLAZE 189
|
||||
#define EM_CUDA 190
|
||||
#define EM_TILEGX 191
|
||||
#define EM_CLOUDSHIELD 192
|
||||
#define EM_COREA_1ST 193
|
||||
#define EM_COREA_2ND 194
|
||||
#define EM_ARC_COMPACT2 195
|
||||
#define EM_OPEN8 196
|
||||
#define EM_RL78 197
|
||||
#define EM_VIDEOCORE5 198
|
||||
#define EM_78KOR 199
|
||||
#define EM_56800EX 200
|
||||
#define EM_BA1 201
|
||||
#define EM_BA2 202
|
||||
#define EM_XCORE 203
|
||||
#define EM_MCHP_PIC 204
|
||||
#define EM_KM32 210
|
||||
#define EM_KMX32 211
|
||||
#define EM_EMX16 212
|
||||
#define EM_EMX8 213
|
||||
#define EM_KVARC 214
|
||||
#define EM_CDP 215
|
||||
#define EM_COGE 216
|
||||
#define EM_COOL 217
|
||||
#define EM_NORC 218
|
||||
#define EM_CSR_KALIMBA 219
|
||||
#define EM_Z80 220
|
||||
#define EM_VISIUM 221
|
||||
#define EM_FT32 222
|
||||
#define EM_MOXIE 223
|
||||
#define EM_AMDGPU 224
|
||||
#define EM_RISCV 243
|
||||
#define EM_BPF 247
|
||||
#define EM_CSKY 252
|
||||
#define EM_NUM 253
|
||||
|
||||
#define EM_ALPHA 0x9026
|
||||
|
||||
#define EV_NONE 0
|
||||
#define EV_CURRENT 1
|
||||
#define EV_NUM 2
|
||||
|
||||
typedef struct {
|
||||
Elf32_Word sh_name;
|
||||
Elf32_Word sh_type;
|
||||
Elf32_Word sh_flags;
|
||||
Elf32_Addr sh_addr;
|
||||
Elf32_Off sh_offset;
|
||||
Elf32_Word sh_size;
|
||||
Elf32_Word sh_link;
|
||||
Elf32_Word sh_info;
|
||||
Elf32_Word sh_addralign;
|
||||
Elf32_Word sh_entsize;
|
||||
} Elf32_Shdr;
|
||||
|
||||
typedef struct {
|
||||
Elf64_Word sh_name;
|
||||
Elf64_Word sh_type;
|
||||
Elf64_Xword sh_flags;
|
||||
Elf64_Addr sh_addr;
|
||||
Elf64_Off sh_offset;
|
||||
Elf64_Xword sh_size;
|
||||
Elf64_Word sh_link;
|
||||
Elf64_Word sh_info;
|
||||
Elf64_Xword sh_addralign;
|
||||
Elf64_Xword sh_entsize;
|
||||
} Elf64_Shdr;
|
||||
|
||||
|
||||
|
||||
#define SHN_UNDEF 0
|
||||
#define SHN_LORESERVE 0xff00
|
||||
#define SHN_LOPROC 0xff00
|
||||
#define SHN_BEFORE 0xff00
|
||||
|
||||
#define SHN_AFTER 0xff01
|
||||
|
||||
#define SHN_HIPROC 0xff1f
|
||||
#define SHN_LOOS 0xff20
|
||||
#define SHN_HIOS 0xff3f
|
||||
#define SHN_ABS 0xfff1
|
||||
#define SHN_COMMON 0xfff2
|
||||
#define SHN_XINDEX 0xffff
|
||||
#define SHN_HIRESERVE 0xffff
|
||||
|
||||
|
||||
|
||||
#define SHT_NULL 0
|
||||
#define SHT_PROGBITS 1
|
||||
#define SHT_SYMTAB 2
|
||||
#define SHT_STRTAB 3
|
||||
#define SHT_RELA 4
|
||||
#define SHT_HASH 5
|
||||
#define SHT_DYNAMIC 6
|
||||
#define SHT_NOTE 7
|
||||
#define SHT_NOBITS 8
|
||||
#define SHT_REL 9
|
||||
#define SHT_SHLIB 10
|
||||
#define SHT_DYNSYM 11
|
||||
#define SHT_INIT_ARRAY 14
|
||||
#define SHT_FINI_ARRAY 15
|
||||
#define SHT_PREINIT_ARRAY 16
|
||||
#define SHT_GROUP 17
|
||||
#define SHT_SYMTAB_SHNDX 18
|
||||
#define SHT_NUM 19
|
||||
#define SHT_LOOS 0x60000000
|
||||
#define SHT_GNU_ATTRIBUTES 0x6ffffff5
|
||||
#define SHT_GNU_HASH 0x6ffffff6
|
||||
#define SHT_GNU_LIBLIST 0x6ffffff7
|
||||
#define SHT_CHECKSUM 0x6ffffff8
|
||||
#define SHT_LOSUNW 0x6ffffffa
|
||||
#define SHT_SUNW_move 0x6ffffffa
|
||||
#define SHT_SUNW_COMDAT 0x6ffffffb
|
||||
#define SHT_SUNW_syminfo 0x6ffffffc
|
||||
#define SHT_GNU_verdef 0x6ffffffd
|
||||
#define SHT_GNU_verneed 0x6ffffffe
|
||||
#define SHT_GNU_versym 0x6fffffff
|
||||
#define SHT_HISUNW 0x6fffffff
|
||||
#define SHT_HIOS 0x6fffffff
|
||||
#define SHT_LOPROC 0x70000000
|
||||
#define SHT_HIPROC 0x7fffffff
|
||||
#define SHT_LOUSER 0x80000000
|
||||
#define SHT_HIUSER 0x8fffffff
|
||||
|
||||
#define SHF_WRITE (1 << 0)
|
||||
#define SHF_ALLOC (1 << 1)
|
||||
#define SHF_EXECINSTR (1 << 2)
|
||||
#define SHF_MERGE (1 << 4)
|
||||
#define SHF_STRINGS (1 << 5)
|
||||
#define SHF_INFO_LINK (1 << 6)
|
||||
#define SHF_LINK_ORDER (1 << 7)
|
||||
#define SHF_OS_NONCONFORMING (1 << 8)
|
||||
|
||||
#define SHF_GROUP (1 << 9)
|
||||
#define SHF_TLS (1 << 10)
|
||||
#define SHF_COMPRESSED (1 << 11)
|
||||
#define SHF_MASKOS 0x0ff00000
|
||||
#define SHF_MASKPROC 0xf0000000
|
||||
#define SHF_ORDERED (1 << 30)
|
||||
#define SHF_EXCLUDE (1U << 31)
|
||||
|
||||
typedef struct {
|
||||
Elf32_Word ch_type;
|
||||
Elf32_Word ch_size;
|
||||
Elf32_Word ch_addralign;
|
||||
} Elf32_Chdr;
|
||||
|
||||
typedef struct {
|
||||
Elf64_Word ch_type;
|
||||
Elf64_Word ch_reserved;
|
||||
Elf64_Xword ch_size;
|
||||
Elf64_Xword ch_addralign;
|
||||
} Elf64_Chdr;
|
||||
|
||||
#define ELFCOMPRESS_ZLIB 1
|
||||
#define ELFCOMPRESS_LOOS 0x60000000
|
||||
#define ELFCOMPRESS_HIOS 0x6fffffff
|
||||
#define ELFCOMPRESS_LOPROC 0x70000000
|
||||
#define ELFCOMPRESS_HIPROC 0x7fffffff
|
||||
|
||||
|
||||
#define GRP_COMDAT 0x1
|
||||
|
||||
typedef struct {
|
||||
Elf32_Word st_name;
|
||||
Elf32_Addr st_value;
|
||||
Elf32_Word st_size;
|
||||
unsigned char st_info;
|
||||
unsigned char st_other;
|
||||
Elf32_Section st_shndx;
|
||||
} Elf32_Sym;
|
||||
|
||||
typedef struct {
|
||||
Elf64_Word st_name;
|
||||
unsigned char st_info;
|
||||
unsigned char st_other;
|
||||
Elf64_Section st_shndx;
|
||||
Elf64_Addr st_value;
|
||||
Elf64_Xword st_size;
|
||||
} Elf64_Sym;
|
||||
|
||||
typedef struct {
|
||||
Elf32_Half si_boundto;
|
||||
Elf32_Half si_flags;
|
||||
} Elf32_Syminfo;
|
||||
|
||||
typedef struct {
|
||||
Elf64_Half si_boundto;
|
||||
Elf64_Half si_flags;
|
||||
} Elf64_Syminfo;
|
||||
|
||||
#define SYMINFO_BT_SELF 0xffff
|
||||
#define SYMINFO_BT_PARENT 0xfffe
|
||||
#define SYMINFO_BT_LOWRESERVE 0xff00
|
||||
|
||||
#define SYMINFO_FLG_DIRECT 0x0001
|
||||
#define SYMINFO_FLG_PASSTHRU 0x0002
|
||||
#define SYMINFO_FLG_COPY 0x0004
|
||||
#define SYMINFO_FLG_LAZYLOAD 0x0008
|
||||
|
||||
#define SYMINFO_NONE 0
|
||||
#define SYMINFO_CURRENT 1
|
||||
#define SYMINFO_NUM 2
|
||||
|
||||
#define ELF32_ST_BIND(val) (((unsigned char) (val)) >> 4)
|
||||
#define ELF32_ST_TYPE(val) ((val) & 0xf)
|
||||
#define ELF32_ST_INFO(bind, type) (((bind) << 4) + ((type) & 0xf))
|
||||
|
||||
#define ELF64_ST_BIND(val) ELF32_ST_BIND (val)
|
||||
#define ELF64_ST_TYPE(val) ELF32_ST_TYPE (val)
|
||||
#define ELF64_ST_INFO(bind, type) ELF32_ST_INFO ((bind), (type))
|
||||
|
||||
#define STB_LOCAL 0
|
||||
#define STB_GLOBAL 1
|
||||
#define STB_WEAK 2
|
||||
#define STB_NUM 3
|
||||
#define STB_LOOS 10
|
||||
#define STB_GNU_UNIQUE 10
|
||||
#define STB_HIOS 12
|
||||
#define STB_LOPROC 13
|
||||
#define STB_HIPROC 15
|
||||
|
||||
#define STT_NOTYPE 0
|
||||
#define STT_OBJECT 1
|
||||
#define STT_FUNC 2
|
||||
#define STT_SECTION 3
|
||||
#define STT_FILE 4
|
||||
#define STT_COMMON 5
|
||||
#define STT_TLS 6
|
||||
#define STT_NUM 7
|
||||
#define STT_LOOS 10
|
||||
#define STT_GNU_IFUNC 10
|
||||
#define STT_HIOS 12
|
||||
#define STT_LOPROC 13
|
||||
#define STT_HIPROC 15
|
||||
|
||||
#define STN_UNDEF 0
|
||||
|
||||
#define ELF32_ST_VISIBILITY(o) ((o) & 0x03)
|
||||
#define ELF64_ST_VISIBILITY(o) ELF32_ST_VISIBILITY (o)
|
||||
|
||||
#define STV_DEFAULT 0
|
||||
#define STV_INTERNAL 1
|
||||
#define STV_HIDDEN 2
|
||||
#define STV_PROTECTED 3
|
||||
|
||||
|
||||
|
||||
|
||||
typedef struct {
|
||||
Elf32_Addr r_offset;
|
||||
Elf32_Word r_info;
|
||||
} Elf32_Rel;
|
||||
|
||||
typedef struct {
|
||||
Elf64_Addr r_offset;
|
||||
Elf64_Xword r_info;
|
||||
} Elf64_Rel;
|
||||
|
||||
|
||||
|
||||
typedef struct {
|
||||
Elf32_Addr r_offset;
|
||||
Elf32_Word r_info;
|
||||
Elf32_Sword r_addend;
|
||||
} Elf32_Rela;
|
||||
|
||||
typedef struct {
|
||||
Elf64_Addr r_offset;
|
||||
Elf64_Xword r_info;
|
||||
Elf64_Sxword r_addend;
|
||||
} Elf64_Rela;
|
||||
|
||||
|
||||
|
||||
#define ELF32_R_SYM(val) ((val) >> 8)
|
||||
#define ELF32_R_TYPE(val) ((val) & 0xff)
|
||||
#define ELF32_R_INFO(sym, type) (((sym) << 8) + ((type) & 0xff))
|
||||
|
||||
#define ELF64_R_SYM(i) ((i) >> 32)
|
||||
#define ELF64_R_TYPE(i) ((i) & 0xffffffff)
|
||||
#define ELF64_R_INFO(sym,type) ((((Elf64_Xword) (sym)) << 32) + (type))
|
||||
|
||||
|
||||
|
||||
typedef struct {
|
||||
Elf32_Word p_type;
|
||||
Elf32_Off p_offset;
|
||||
Elf32_Addr p_vaddr;
|
||||
Elf32_Addr p_paddr;
|
||||
Elf32_Word p_filesz;
|
||||
Elf32_Word p_memsz;
|
||||
Elf32_Word p_flags;
|
||||
Elf32_Word p_align;
|
||||
} Elf32_Phdr;
|
||||
|
||||
typedef struct {
|
||||
Elf64_Word p_type;
|
||||
Elf64_Word p_flags;
|
||||
Elf64_Off p_offset;
|
||||
Elf64_Addr p_vaddr;
|
||||
Elf64_Addr p_paddr;
|
||||
Elf64_Xword p_filesz;
|
||||
Elf64_Xword p_memsz;
|
||||
Elf64_Xword p_align;
|
||||
} Elf64_Phdr;
|
||||
|
||||
|
||||
|
||||
#define PT_NULL 0
|
||||
#define PT_LOAD 1
|
||||
#define PT_DYNAMIC 2
|
||||
#define PT_INTERP 3
|
||||
#define PT_NOTE 4
|
||||
#define PT_SHLIB 5
|
||||
#define PT_PHDR 6
|
||||
#define PT_TLS 7
|
||||
#define PT_NUM 8
|
||||
#define PT_LOOS 0x60000000
|
||||
#define PT_GNU_EH_FRAME 0x6474e550
|
||||
#define PT_GNU_STACK 0x6474e551
|
||||
#define PT_GNU_RELRO 0x6474e552
|
||||
#define PT_LOSUNW 0x6ffffffa
|
||||
#define PT_SUNWBSS 0x6ffffffa
|
||||
#define PT_SUNWSTACK 0x6ffffffb
|
||||
#define PT_HISUNW 0x6fffffff
|
||||
#define PT_HIOS 0x6fffffff
|
||||
#define PT_LOPROC 0x70000000
|
||||
#define PT_HIPROC 0x7fffffff
|
||||
|
||||
|
||||
#define PN_XNUM 0xffff
|
||||
|
||||
|
||||
#define PF_X (1 << 0)
|
||||
#define PF_W (1 << 1)
|
||||
#define PF_R (1 << 2)
|
||||
#define PF_MASKOS 0x0ff00000
|
||||
#define PF_MASKPROC 0xf0000000
|
||||
|
||||
|
||||
|
||||
#define NT_PRSTATUS 1
|
||||
#define NT_PRFPREG 2
|
||||
#define NT_FPREGSET 2
|
||||
#define NT_PRPSINFO 3
|
||||
#define NT_PRXREG 4
|
||||
#define NT_TASKSTRUCT 4
|
||||
#define NT_PLATFORM 5
|
||||
#define NT_AUXV 6
|
||||
#define NT_GWINDOWS 7
|
||||
#define NT_ASRS 8
|
||||
#define NT_PSTATUS 10
|
||||
#define NT_PSINFO 13
|
||||
#define NT_PRCRED 14
|
||||
#define NT_UTSNAME 15
|
||||
#define NT_LWPSTATUS 16
|
||||
#define NT_LWPSINFO 17
|
||||
#define NT_PRFPXREG 20
|
||||
#define NT_SIGINFO 0x53494749
|
||||
#define NT_FILE 0x46494c45
|
||||
#define NT_PRXFPREG 0x46e62b7f
|
||||
#define NT_PPC_VMX 0x100
|
||||
#define NT_PPC_SPE 0x101
|
||||
#define NT_PPC_VSX 0x102
|
||||
#define NT_PPC_TAR 0x103
|
||||
#define NT_PPC_PPR 0x104
|
||||
#define NT_PPC_DSCR 0x105
|
||||
#define NT_PPC_EBB 0x106
|
||||
#define NT_PPC_PMU 0x107
|
||||
#define NT_PPC_TM_CGPR 0x108
|
||||
#define NT_PPC_TM_CFPR 0x109
|
||||
#define NT_PPC_TM_CVMX 0x10a
|
||||
#define NT_PPC_TM_CVSX 0x10b
|
||||
#define NT_PPC_TM_SPR 0x10c
|
||||
#define NT_PPC_TM_CTAR 0x10d
|
||||
#define NT_PPC_TM_CPPR 0x10e
|
||||
#define NT_PPC_TM_CDSCR 0x10f
|
||||
#define NT_386_TLS 0x200
|
||||
#define NT_386_IOPERM 0x201
|
||||
#define NT_X86_XSTATE 0x202
|
||||
#define NT_S390_HIGH_GPRS 0x300
|
||||
#define NT_S390_TIMER 0x301
|
||||
#define NT_S390_TODCMP 0x302
|
||||
#define NT_S390_TODPREG 0x303
|
||||
#define NT_S390_CTRS 0x304
|
||||
#define NT_S390_PREFIX 0x305
|
||||
#define NT_S390_LAST_BREAK 0x306
|
||||
#define NT_S390_SYSTEM_CALL 0x307
|
||||
#define NT_S390_TDB 0x308
|
||||
#define NT_S390_VXRS_LOW 0x309
|
||||
#define NT_S390_VXRS_HIGH 0x30a
|
||||
#define NT_S390_GS_CB 0x30b
|
||||
#define NT_S390_GS_BC 0x30c
|
||||
#define NT_S390_RI_CB 0x30d
|
||||
#define NT_ARM_VFP 0x400
|
||||
#define NT_ARM_TLS 0x401
|
||||
#define NT_ARM_HW_BREAK 0x402
|
||||
#define NT_ARM_HW_WATCH 0x403
|
||||
#define NT_ARM_SYSTEM_CALL 0x404
|
||||
#define NT_ARM_SVE 0x405
|
||||
#define NT_ARM_PAC_MASK 0x406
|
||||
#define NT_ARM_PACA_KEYS 0x407
|
||||
#define NT_ARM_PACG_KEYS 0x408
|
||||
#define NT_METAG_CBUF 0x500
|
||||
#define NT_METAG_RPIPE 0x501
|
||||
#define NT_METAG_TLS 0x502
|
||||
#define NT_ARC_V2 0x600
|
||||
#define NT_VMCOREDD 0x700
|
||||
#define NT_MIPS_DSP 0x800
|
||||
#define NT_MIPS_FP_MODE 0x801
|
||||
#define NT_MIPS_MSA 0x802
|
||||
#define NT_VERSION 1
|
||||
|
||||
|
||||
|
||||
|
||||
typedef struct {
|
||||
Elf32_Sword d_tag;
|
||||
union {
|
||||
Elf32_Word d_val;
|
||||
Elf32_Addr d_ptr;
|
||||
} d_un;
|
||||
} Elf32_Dyn;
|
||||
|
||||
typedef struct {
|
||||
Elf64_Sxword d_tag;
|
||||
union {
|
||||
Elf64_Xword d_val;
|
||||
Elf64_Addr d_ptr;
|
||||
} d_un;
|
||||
} Elf64_Dyn;
|
||||
|
||||
|
||||
|
||||
#define DT_NULL 0
|
||||
#define DT_NEEDED 1
|
||||
#define DT_PLTRELSZ 2
|
||||
#define DT_PLTGOT 3
|
||||
#define DT_HASH 4
|
||||
#define DT_STRTAB 5
|
||||
#define DT_SYMTAB 6
|
||||
#define DT_RELA 7
|
||||
#define DT_RELASZ 8
|
||||
#define DT_RELAENT 9
|
||||
#define DT_STRSZ 10
|
||||
#define DT_SYMENT 11
|
||||
#define DT_INIT 12
|
||||
#define DT_FINI 13
|
||||
#define DT_SONAME 14
|
||||
#define DT_RPATH 15
|
||||
#define DT_SYMBOLIC 16
|
||||
#define DT_REL 17
|
||||
#define DT_RELSZ 18
|
||||
#define DT_RELENT 19
|
||||
#define DT_PLTREL 20
|
||||
#define DT_DEBUG 21
|
||||
#define DT_TEXTREL 22
|
||||
#define DT_JMPREL 23
|
||||
#define DT_BIND_NOW 24
|
||||
#define DT_INIT_ARRAY 25
|
||||
#define DT_FINI_ARRAY 26
|
||||
#define DT_INIT_ARRAYSZ 27
|
||||
#define DT_FINI_ARRAYSZ 28
|
||||
#define DT_RUNPATH 29
|
||||
#define DT_FLAGS 30
|
||||
#define DT_ENCODING 32
|
||||
#define DT_PREINIT_ARRAY 32
|
||||
#define DT_PREINIT_ARRAYSZ 33
|
||||
#define DT_SYMTAB_SHNDX 34
|
||||
#define DT_NUM 35
|
||||
#define DT_LOOS 0x6000000d
|
||||
#define DT_HIOS 0x6ffff000
|
||||
#define DT_LOPROC 0x70000000
|
||||
#define DT_HIPROC 0x7fffffff
|
||||
#define DT_PROCNUM DT_MIPS_NUM
|
||||
|
||||
#define DT_VALRNGLO 0x6ffffd00
|
||||
#define DT_GNU_PRELINKED 0x6ffffdf5
|
||||
#define DT_GNU_CONFLICTSZ 0x6ffffdf6
|
||||
#define DT_GNU_LIBLISTSZ 0x6ffffdf7
|
||||
#define DT_CHECKSUM 0x6ffffdf8
|
||||
#define DT_PLTPADSZ 0x6ffffdf9
|
||||
#define DT_MOVEENT 0x6ffffdfa
|
||||
#define DT_MOVESZ 0x6ffffdfb
|
||||
#define DT_FEATURE_1 0x6ffffdfc
|
||||
#define DT_POSFLAG_1 0x6ffffdfd
|
||||
|
||||
#define DT_SYMINSZ 0x6ffffdfe
|
||||
#define DT_SYMINENT 0x6ffffdff
|
||||
#define DT_VALRNGHI 0x6ffffdff
|
||||
#define DT_VALTAGIDX(tag) (DT_VALRNGHI - (tag))
|
||||
#define DT_VALNUM 12
|
||||
|
||||
#define DT_ADDRRNGLO 0x6ffffe00
|
||||
#define DT_GNU_HASH 0x6ffffef5
|
||||
#define DT_TLSDESC_PLT 0x6ffffef6
|
||||
#define DT_TLSDESC_GOT 0x6ffffef7
|
||||
#define DT_GNU_CONFLICT 0x6ffffef8
|
||||
#define DT_GNU_LIBLIST 0x6ffffef9
|
||||
#define DT_CONFIG 0x6ffffefa
|
||||
#define DT_DEPAUDIT 0x6ffffefb
|
||||
#define DT_AUDIT 0x6ffffefc
|
||||
#define DT_PLTPAD 0x6ffffefd
|
||||
#define DT_MOVETAB 0x6ffffefe
|
||||
#define DT_SYMINFO 0x6ffffeff
|
||||
#define DT_ADDRRNGHI 0x6ffffeff
|
||||
#define DT_ADDRTAGIDX(tag) (DT_ADDRRNGHI - (tag))
|
||||
#define DT_ADDRNUM 11
|
||||
|
||||
|
||||
|
||||
#define DT_VERSYM 0x6ffffff0
|
||||
|
||||
#define DT_RELACOUNT 0x6ffffff9
|
||||
#define DT_RELCOUNT 0x6ffffffa
|
||||
|
||||
|
||||
#define DT_FLAGS_1 0x6ffffffb
|
||||
#define DT_VERDEF 0x6ffffffc
|
||||
|
||||
#define DT_VERDEFNUM 0x6ffffffd
|
||||
#define DT_VERNEED 0x6ffffffe
|
||||
|
||||
#define DT_VERNEEDNUM 0x6fffffff
|
||||
#define DT_VERSIONTAGIDX(tag) (DT_VERNEEDNUM - (tag))
|
||||
#define DT_VERSIONTAGNUM 16
|
||||
|
||||
|
||||
|
||||
#define DT_AUXILIARY 0x7ffffffd
|
||||
#define DT_FILTER 0x7fffffff
|
||||
#define DT_EXTRATAGIDX(tag) ((Elf32_Word)-((Elf32_Sword) (tag) <<1>>1)-1)
|
||||
#define DT_EXTRANUM 3
|
||||
|
||||
|
||||
#define DF_ORIGIN 0x00000001
|
||||
#define DF_SYMBOLIC 0x00000002
|
||||
#define DF_TEXTREL 0x00000004
|
||||
#define DF_BIND_NOW 0x00000008
|
||||
#define DF_STATIC_TLS 0x00000010
|
||||
|
||||
|
||||
|
||||
#define DF_1_NOW 0x00000001
|
||||
#define DF_1_GLOBAL 0x00000002
|
||||
#define DF_1_GROUP 0x00000004
|
||||
#define DF_1_NODELETE 0x00000008
|
||||
#define DF_1_LOADFLTR 0x00000010
|
||||
#define DF_1_INITFIRST 0x00000020
|
||||
#define DF_1_NOOPEN 0x00000040
|
||||
#define DF_1_ORIGIN 0x00000080
|
||||
#define DF_1_DIRECT 0x00000100
|
||||
#define DF_1_TRANS 0x00000200
|
||||
#define DF_1_INTERPOSE 0x00000400
|
||||
#define DF_1_NODEFLIB 0x00000800
|
||||
#define DF_1_NODUMP 0x00001000
|
||||
#define DF_1_CONFALT 0x00002000
|
||||
#define DF_1_ENDFILTEE 0x00004000
|
||||
#define DF_1_DISPRELDNE 0x00008000
|
||||
#define DF_1_DISPRELPND 0x00010000
|
||||
#define DF_1_NODIRECT 0x00020000
|
||||
#define DF_1_IGNMULDEF 0x00040000
|
||||
#define DF_1_NOKSYMS 0x00080000
|
||||
#define DF_1_NOHDR 0x00100000
|
||||
#define DF_1_EDITED 0x00200000
|
||||
#define DF_1_NORELOC 0x00400000
|
||||
#define DF_1_SYMINTPOSE 0x00800000
|
||||
#define DF_1_GLOBAUDIT 0x01000000
|
||||
#define DF_1_SINGLETON 0x02000000
|
||||
#define DF_1_STUB 0x04000000
|
||||
#define DF_1_PIE 0x08000000
|
||||
|
||||
#define DTF_1_PARINIT 0x00000001
|
||||
#define DTF_1_CONFEXP 0x00000002
|
||||
|
||||
|
||||
#define DF_P1_LAZYLOAD 0x00000001
|
||||
#define DF_P1_GROUPPERM 0x00000002
|
||||
|
||||
|
||||
|
||||
|
||||
typedef struct {
|
||||
Elf32_Half vd_version;
|
||||
Elf32_Half vd_flags;
|
||||
Elf32_Half vd_ndx;
|
||||
Elf32_Half vd_cnt;
|
||||
Elf32_Word vd_hash;
|
||||
Elf32_Word vd_aux;
|
||||
Elf32_Word vd_next;
|
||||
} Elf32_Verdef;
|
||||
|
||||
typedef struct {
|
||||
Elf64_Half vd_version;
|
||||
Elf64_Half vd_flags;
|
||||
Elf64_Half vd_ndx;
|
||||
Elf64_Half vd_cnt;
|
||||
Elf64_Word vd_hash;
|
||||
Elf64_Word vd_aux;
|
||||
Elf64_Word vd_next;
|
||||
} Elf64_Verdef;
|
||||
|
||||
|
||||
|
||||
#define VER_DEF_NONE 0
|
||||
#define VER_DEF_CURRENT 1
|
||||
#define VER_DEF_NUM 2
|
||||
|
||||
|
||||
#define VER_FLG_BASE 0x1
|
||||
#define VER_FLG_WEAK 0x2
|
||||
|
||||
|
||||
#define VER_NDX_LOCAL 0
|
||||
#define VER_NDX_GLOBAL 1
|
||||
#define VER_NDX_LORESERVE 0xff00
|
||||
#define VER_NDX_ELIMINATE 0xff01
|
||||
|
||||
|
||||
|
||||
typedef struct {
|
||||
Elf32_Word vda_name;
|
||||
Elf32_Word vda_next;
|
||||
} Elf32_Verdaux;
|
||||
|
||||
typedef struct {
|
||||
Elf64_Word vda_name;
|
||||
Elf64_Word vda_next;
|
||||
} Elf64_Verdaux;
|
||||
|
||||
|
||||
|
||||
|
||||
typedef struct {
|
||||
Elf32_Half vn_version;
|
||||
Elf32_Half vn_cnt;
|
||||
Elf32_Word vn_file;
|
||||
Elf32_Word vn_aux;
|
||||
Elf32_Word vn_next;
|
||||
} Elf32_Verneed;
|
||||
|
||||
typedef struct {
|
||||
Elf64_Half vn_version;
|
||||
Elf64_Half vn_cnt;
|
||||
Elf64_Word vn_file;
|
||||
Elf64_Word vn_aux;
|
||||
Elf64_Word vn_next;
|
||||
} Elf64_Verneed;
|
||||
|
||||
|
||||
|
||||
#define VER_NEED_NONE 0
|
||||
#define VER_NEED_CURRENT 1
|
||||
#define VER_NEED_NUM 2
|
||||
|
||||
|
||||
|
||||
typedef struct {
|
||||
Elf32_Word vna_hash;
|
||||
Elf32_Half vna_flags;
|
||||
Elf32_Half vna_other;
|
||||
Elf32_Word vna_name;
|
||||
Elf32_Word vna_next;
|
||||
} Elf32_Vernaux;
|
||||
|
||||
typedef struct {
|
||||
Elf64_Word vna_hash;
|
||||
Elf64_Half vna_flags;
|
||||
Elf64_Half vna_other;
|
||||
Elf64_Word vna_name;
|
||||
Elf64_Word vna_next;
|
||||
} Elf64_Vernaux;
|
||||
|
||||
|
||||
|
||||
#define VER_FLG_WEAK 0x2
|
||||
|
||||
|
||||
|
||||
typedef struct {
|
||||
uint32_t a_type;
|
||||
union {
|
||||
uint32_t a_val;
|
||||
} a_un;
|
||||
} Elf32_auxv_t;
|
||||
|
||||
typedef struct {
|
||||
uint64_t a_type;
|
||||
union {
|
||||
uint64_t a_val;
|
||||
} a_un;
|
||||
} Elf64_auxv_t;
|
||||
|
||||
|
||||
|
||||
#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_FLAGS 8
|
||||
#define AT_ENTRY 9
|
||||
#define AT_NOTELF 10
|
||||
#define AT_UID 11
|
||||
#define AT_EUID 12
|
||||
#define AT_GID 13
|
||||
#define AT_EGID 14
|
||||
#define AT_CLKTCK 17
|
||||
|
||||
|
||||
#define AT_PLATFORM 15
|
||||
#define AT_HWCAP 16
|
||||
|
||||
|
||||
|
||||
|
||||
#define AT_FPUCW 18
|
||||
|
||||
|
||||
#define AT_DCACHEBSIZE 19
|
||||
#define AT_ICACHEBSIZE 20
|
||||
#define AT_UCACHEBSIZE 21
|
||||
|
||||
|
||||
|
||||
#define AT_IGNOREPPC 22
|
||||
|
||||
#define AT_SECURE 23
|
||||
|
||||
#define AT_BASE_PLATFORM 24
|
||||
|
||||
#define AT_RANDOM 25
|
||||
|
||||
#define AT_HWCAP2 26
|
||||
|
||||
#define AT_EXECFN 31
|
||||
|
||||
|
||||
|
||||
#define AT_SYSINFO 32
|
||||
#define AT_SYSINFO_EHDR 33
|
||||
|
||||
|
||||
|
||||
#define AT_L1I_CACHESHAPE 34
|
||||
#define AT_L1D_CACHESHAPE 35
|
||||
#define AT_L2_CACHESHAPE 36
|
||||
#define AT_L3_CACHESHAPE 37
|
||||
|
||||
#define AT_L1I_CACHESIZE 40
|
||||
#define AT_L1I_CACHEGEOMETRY 41
|
||||
#define AT_L1D_CACHESIZE 42
|
||||
#define AT_L1D_CACHEGEOMETRY 43
|
||||
#define AT_L2_CACHESIZE 44
|
||||
#define AT_L2_CACHEGEOMETRY 45
|
||||
#define AT_L3_CACHESIZE 46
|
||||
#define AT_L3_CACHEGEOMETRY 47
|
||||
|
||||
#define AT_MINSIGSTKSZ 51
|
||||
|
||||
|
||||
typedef struct {
|
||||
Elf32_Word n_namesz;
|
||||
Elf32_Word n_descsz;
|
||||
Elf32_Word n_type;
|
||||
} Elf32_Nhdr;
|
||||
|
||||
typedef struct {
|
||||
Elf64_Word n_namesz;
|
||||
Elf64_Word n_descsz;
|
||||
Elf64_Word n_type;
|
||||
} Elf64_Nhdr;
|
||||
|
||||
|
||||
|
||||
|
||||
#define ELF_NOTE_SOLARIS "SUNW Solaris"
|
||||
|
||||
|
||||
#define ELF_NOTE_GNU "GNU"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define ELF_NOTE_PAGESIZE_HINT 1
|
||||
|
||||
|
||||
#define NT_GNU_ABI_TAG 1
|
||||
#define ELF_NOTE_ABI NT_GNU_ABI_TAG
|
||||
|
||||
|
||||
|
||||
#define ELF_NOTE_OS_LINUX 0
|
||||
#define ELF_NOTE_OS_GNU 1
|
||||
#define ELF_NOTE_OS_SOLARIS2 2
|
||||
#define ELF_NOTE_OS_FREEBSD 3
|
||||
|
||||
#define NT_GNU_BUILD_ID 3
|
||||
#define NT_GNU_GOLD_VERSION 4
|
||||
|
||||
|
||||
|
||||
typedef struct {
|
||||
Elf32_Xword m_value;
|
||||
Elf32_Word m_info;
|
||||
Elf32_Word m_poffset;
|
||||
Elf32_Half m_repeat;
|
||||
Elf32_Half m_stride;
|
||||
} Elf32_Move;
|
||||
|
||||
typedef struct {
|
||||
Elf64_Xword m_value;
|
||||
Elf64_Xword m_info;
|
||||
Elf64_Xword m_poffset;
|
||||
Elf64_Half m_repeat;
|
||||
Elf64_Half m_stride;
|
||||
} Elf64_Move;
|
||||
|
||||
|
||||
#define ELF32_M_SYM(info) ((info) >> 8)
|
||||
#define ELF32_M_SIZE(info) ((unsigned char) (info))
|
||||
#define ELF32_M_INFO(sym, size) (((sym) << 8) + (unsigned char) (size))
|
||||
|
||||
#define ELF64_M_SYM(info) ELF32_M_SYM (info)
|
||||
#define ELF64_M_SIZE(info) ELF32_M_SIZE (info)
|
||||
#define ELF64_M_INFO(sym, size) ELF32_M_INFO (sym, size)
|
||||
|
||||
#define EF_CPU32 0x00810000
|
||||
|
||||
#define R_68K_NONE 0
|
||||
#define R_68K_32 1
|
||||
#define R_68K_16 2
|
||||
#define R_68K_8 3
|
||||
#define R_68K_PC32 4
|
||||
#define R_68K_PC16 5
|
||||
#define R_68K_PC8 6
|
||||
#define R_68K_GOT32 7
|
||||
#define R_68K_GOT16 8
|
||||
#define R_68K_GOT8 9
|
||||
#define R_68K_GOT32O 10
|
||||
#define R_68K_GOT16O 11
|
||||
#define R_68K_GOT8O 12
|
||||
#define R_68K_PLT32 13
|
||||
#define R_68K_PLT16 14
|
||||
#define R_68K_PLT8 15
|
||||
#define R_68K_PLT32O 16
|
||||
#define R_68K_PLT16O 17
|
||||
#define R_68K_PLT8O 18
|
||||
#define R_68K_COPY 19
|
||||
#define R_68K_GLOB_DAT 20
|
||||
#define R_68K_JMP_SLOT 21
|
||||
#define R_68K_RELATIVE 22
|
||||
#define R_68K_TLS_GD32 25
|
||||
#define R_68K_TLS_GD16 26
|
||||
#define R_68K_TLS_GD8 27
|
||||
#define R_68K_TLS_LDM32 28
|
||||
#define R_68K_TLS_LDM16 29
|
||||
#define R_68K_TLS_LDM8 30
|
||||
#define R_68K_TLS_LDO32 31
|
||||
#define R_68K_TLS_LDO16 32
|
||||
#define R_68K_TLS_LDO8 33
|
||||
#define R_68K_TLS_IE32 34
|
||||
#define R_68K_TLS_IE16 35
|
||||
#define R_68K_TLS_IE8 36
|
||||
#define R_68K_TLS_LE32 37
|
||||
#define R_68K_TLS_LE16 38
|
||||
#define R_68K_TLS_LE8 39
|
||||
#define R_68K_TLS_DTPMOD32 40
|
||||
#define R_68K_TLS_DTPREL32 41
|
||||
#define R_68K_TLS_TPREL32 42
|
||||
#define R_68K_NUM 43
|
||||
|
||||
#define R_386_NONE 0
|
||||
#define R_386_32 1
|
||||
#define R_386_PC32 2
|
||||
#define R_386_GOT32 3
|
||||
#define R_386_PLT32 4
|
||||
#define R_386_COPY 5
|
||||
#define R_386_GLOB_DAT 6
|
||||
#define R_386_JMP_SLOT 7
|
||||
#define R_386_RELATIVE 8
|
||||
#define R_386_GOTOFF 9
|
||||
#define R_386_GOTPC 10
|
||||
#define R_386_32PLT 11
|
||||
#define R_386_TLS_TPOFF 14
|
||||
#define R_386_TLS_IE 15
|
||||
#define R_386_TLS_GOTIE 16
|
||||
#define R_386_TLS_LE 17
|
||||
#define R_386_TLS_GD 18
|
||||
#define R_386_TLS_LDM 19
|
||||
#define R_386_16 20
|
||||
#define R_386_PC16 21
|
||||
#define R_386_8 22
|
||||
#define R_386_PC8 23
|
||||
#define R_386_TLS_GD_32 24
|
||||
#define R_386_TLS_GD_PUSH 25
|
||||
#define R_386_TLS_GD_CALL 26
|
||||
#define R_386_TLS_GD_POP 27
|
||||
#define R_386_TLS_LDM_32 28
|
||||
#define R_386_TLS_LDM_PUSH 29
|
||||
#define R_386_TLS_LDM_CALL 30
|
||||
#define R_386_TLS_LDM_POP 31
|
||||
#define R_386_TLS_LDO_32 32
|
||||
#define R_386_TLS_IE_32 33
|
||||
#define R_386_TLS_LE_32 34
|
||||
#define R_386_TLS_DTPMOD32 35
|
||||
#define R_386_TLS_DTPOFF32 36
|
||||
#define R_386_TLS_TPOFF32 37
|
||||
#define R_386_SIZE32 38
|
||||
#define R_386_TLS_GOTDESC 39
|
||||
#define R_386_TLS_DESC_CALL 40
|
||||
#define R_386_TLS_DESC 41
|
||||
#define R_386_IRELATIVE 42
|
||||
#define R_386_GOT32X 43
|
||||
#define R_386_NUM 44
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define STT_SPARC_REGISTER 13
|
||||
|
||||
|
||||
|
||||
#define EF_SPARCV9_MM 3
|
||||
#define EF_SPARCV9_TSO 0
|
||||
#define EF_SPARCV9_PSO 1
|
||||
#define EF_SPARCV9_RMO 2
|
||||
#define EF_SPARC_LEDATA 0x800000
|
||||
#define EF_SPARC_EXT_MASK 0xFFFF00
|
||||
#define EF_SPARC_32PLUS 0x000100
|
||||
#define EF_SPARC_SUN_US1 0x000200
|
||||
#define EF_SPARC_HAL_R1 0x000400
|
||||
#define EF_SPARC_SUN_US3 0x000800
|
||||
|
||||
|
||||
|
||||
#define R_SPARC_NONE 0
|
||||
#define R_SPARC_8 1
|
||||
#define R_SPARC_16 2
|
||||
#define R_SPARC_32 3
|
||||
#define R_SPARC_DISP8 4
|
||||
#define R_SPARC_DISP16 5
|
||||
#define R_SPARC_DISP32 6
|
||||
#define R_SPARC_WDISP30 7
|
||||
#define R_SPARC_WDISP22 8
|
||||
#define R_SPARC_HI22 9
|
||||
#define R_SPARC_22 10
|
||||
#define R_SPARC_13 11
|
||||
#define R_SPARC_LO10 12
|
||||
#define R_SPARC_GOT10 13
|
||||
#define R_SPARC_GOT13 14
|
||||
#define R_SPARC_GOT22 15
|
||||
#define R_SPARC_PC10 16
|
||||
#define R_SPARC_PC22 17
|
||||
#define R_SPARC_WPLT30 18
|
||||
#define R_SPARC_COPY 19
|
||||
#define R_SPARC_GLOB_DAT 20
|
||||
#define R_SPARC_JMP_SLOT 21
|
||||
#define R_SPARC_RELATIVE 22
|
||||
#define R_SPARC_UA32 23
|
||||
|
||||
|
||||
|
||||
#define R_SPARC_PLT32 24
|
||||
#define R_SPARC_HIPLT22 25
|
||||
#define R_SPARC_LOPLT10 26
|
||||
#define R_SPARC_PCPLT32 27
|
||||
#define R_SPARC_PCPLT22 28
|
||||
#define R_SPARC_PCPLT10 29
|
||||
#define R_SPARC_10 30
|
||||
#define R_SPARC_11 31
|
||||
#define R_SPARC_64 32
|
||||
#define R_SPARC_OLO10 33
|
||||
#define R_SPARC_HH22 34
|
||||
#define R_SPARC_HM10 35
|
||||
#define R_SPARC_LM22 36
|
||||
#define R_SPARC_PC_HH22 37
|
||||
#define R_SPARC_PC_HM10 38
|
||||
#define R_SPARC_PC_LM22 39
|
||||
#define R_SPARC_WDISP16 40
|
||||
#define R_SPARC_WDISP19 41
|
||||
#define R_SPARC_GLOB_JMP 42
|
||||
#define R_SPARC_7 43
|
||||
#define R_SPARC_5 44
|
||||
#define R_SPARC_6 45
|
||||
#define R_SPARC_DISP64 46
|
||||
#define R_SPARC_PLT64 47
|
||||
#define R_SPARC_HIX22 48
|
||||
#define R_SPARC_LOX10 49
|
||||
#define R_SPARC_H44 50
|
||||
#define R_SPARC_M44 51
|
||||
#define R_SPARC_L44 52
|
||||
#define R_SPARC_REGISTER 53
|
||||
#define R_SPARC_UA64 54
|
||||
#define R_SPARC_UA16 55
|
||||
#define R_SPARC_TLS_GD_HI22 56
|
||||
#define R_SPARC_TLS_GD_LO10 57
|
||||
#define R_SPARC_TLS_GD_ADD 58
|
||||
#define R_SPARC_TLS_GD_CALL 59
|
||||
#define R_SPARC_TLS_LDM_HI22 60
|
||||
#define R_SPARC_TLS_LDM_LO10 61
|
||||
#define R_SPARC_TLS_LDM_ADD 62
|
||||
#define R_SPARC_TLS_LDM_CALL 63
|
||||
#define R_SPARC_TLS_LDO_HIX22 64
|
||||
#define R_SPARC_TLS_LDO_LOX10 65
|
||||
#define R_SPARC_TLS_LDO_ADD 66
|
||||
#define R_SPARC_TLS_IE_HI22 67
|
||||
#define R_SPARC_TLS_IE_LO10 68
|
||||
#define R_SPARC_TLS_IE_LD 69
|
||||
#define R_SPARC_TLS_IE_LDX 70
|
||||
#define R_SPARC_TLS_IE_ADD 71
|
||||
#define R_SPARC_TLS_LE_HIX22 72
|
||||
#define R_SPARC_TLS_LE_LOX10 73
|
||||
#define R_SPARC_TLS_DTPMOD32 74
|
||||
#define R_SPARC_TLS_DTPMOD64 75
|
||||
#define R_SPARC_TLS_DTPOFF32 76
|
||||
#define R_SPARC_TLS_DTPOFF64 77
|
||||
#define R_SPARC_TLS_TPOFF32 78
|
||||
#define R_SPARC_TLS_TPOFF64 79
|
||||
#define R_SPARC_GOTDATA_HIX22 80
|
||||
#define R_SPARC_GOTDATA_LOX10 81
|
||||
#define R_SPARC_GOTDATA_OP_HIX22 82
|
||||
#define R_SPARC_GOTDATA_OP_LOX10 83
|
||||
#define R_SPARC_GOTDATA_OP 84
|
||||
#define R_SPARC_H34 85
|
||||
#define R_SPARC_SIZE32 86
|
||||
#define R_SPARC_SIZE64 87
|
||||
#define R_SPARC_GNU_VTINHERIT 250
|
||||
#define R_SPARC_GNU_VTENTRY 251
|
||||
#define R_SPARC_REV32 252
|
||||
|
||||
#define R_SPARC_NUM 253
|
||||
|
||||
|
||||
|
||||
#define DT_SPARC_REGISTER 0x70000001
|
||||
#define DT_SPARC_NUM 2
|
||||
|
||||
|
||||
#define EF_MIPS_NOREORDER 1
|
||||
#define EF_MIPS_PIC 2
|
||||
#define EF_MIPS_CPIC 4
|
||||
#define EF_MIPS_XGOT 8
|
||||
#define EF_MIPS_64BIT_WHIRL 16
|
||||
#define EF_MIPS_ABI2 32
|
||||
#define EF_MIPS_ABI_ON32 64
|
||||
#define EF_MIPS_FP64 512
|
||||
#define EF_MIPS_NAN2008 1024
|
||||
#define EF_MIPS_ARCH 0xf0000000
|
||||
|
||||
|
||||
|
||||
#define EF_MIPS_ARCH_1 0x00000000
|
||||
#define EF_MIPS_ARCH_2 0x10000000
|
||||
#define EF_MIPS_ARCH_3 0x20000000
|
||||
#define EF_MIPS_ARCH_4 0x30000000
|
||||
#define EF_MIPS_ARCH_5 0x40000000
|
||||
#define EF_MIPS_ARCH_32 0x50000000
|
||||
#define EF_MIPS_ARCH_64 0x60000000
|
||||
#define EF_MIPS_ARCH_32R2 0x70000000
|
||||
#define EF_MIPS_ARCH_64R2 0x80000000
|
||||
|
||||
|
||||
#define E_MIPS_ARCH_1 0x00000000
|
||||
#define E_MIPS_ARCH_2 0x10000000
|
||||
#define E_MIPS_ARCH_3 0x20000000
|
||||
#define E_MIPS_ARCH_4 0x30000000
|
||||
#define E_MIPS_ARCH_5 0x40000000
|
||||
#define E_MIPS_ARCH_32 0x50000000
|
||||
#define E_MIPS_ARCH_64 0x60000000
|
||||
|
||||
|
||||
|
||||
#define SHN_MIPS_ACOMMON 0xff00
|
||||
#define SHN_MIPS_TEXT 0xff01
|
||||
#define SHN_MIPS_DATA 0xff02
|
||||
#define SHN_MIPS_SCOMMON 0xff03
|
||||
#define SHN_MIPS_SUNDEFINED 0xff04
|
||||
|
||||
|
||||
|
||||
#define SHT_MIPS_LIBLIST 0x70000000
|
||||
#define SHT_MIPS_MSYM 0x70000001
|
||||
#define SHT_MIPS_CONFLICT 0x70000002
|
||||
#define SHT_MIPS_GPTAB 0x70000003
|
||||
#define SHT_MIPS_UCODE 0x70000004
|
||||
#define SHT_MIPS_DEBUG 0x70000005
|
||||
#define SHT_MIPS_REGINFO 0x70000006
|
||||
#define SHT_MIPS_PACKAGE 0x70000007
|
||||
#define SHT_MIPS_PACKSYM 0x70000008
|
||||
#define SHT_MIPS_RELD 0x70000009
|
||||
#define SHT_MIPS_IFACE 0x7000000b
|
||||
#define SHT_MIPS_CONTENT 0x7000000c
|
||||
#define SHT_MIPS_OPTIONS 0x7000000d
|
||||
#define SHT_MIPS_SHDR 0x70000010
|
||||
#define SHT_MIPS_FDESC 0x70000011
|
||||
#define SHT_MIPS_EXTSYM 0x70000012
|
||||
#define SHT_MIPS_DENSE 0x70000013
|
||||
#define SHT_MIPS_PDESC 0x70000014
|
||||
#define SHT_MIPS_LOCSYM 0x70000015
|
||||
#define SHT_MIPS_AUXSYM 0x70000016
|
||||
#define SHT_MIPS_OPTSYM 0x70000017
|
||||
#define SHT_MIPS_LOCSTR 0x70000018
|
||||
#define SHT_MIPS_LINE 0x70000019
|
||||
#define SHT_MIPS_RFDESC 0x7000001a
|
||||
#define SHT_MIPS_DELTASYM 0x7000001b
|
||||
#define SHT_MIPS_DELTAINST 0x7000001c
|
||||
#define SHT_MIPS_DELTACLASS 0x7000001d
|
||||
#define SHT_MIPS_DWARF 0x7000001e
|
||||
#define SHT_MIPS_DELTADECL 0x7000001f
|
||||
#define SHT_MIPS_SYMBOL_LIB 0x70000020
|
||||
#define SHT_MIPS_EVENTS 0x70000021
|
||||
#define SHT_MIPS_TRANSLATE 0x70000022
|
||||
#define SHT_MIPS_PIXIE 0x70000023
|
||||
#define SHT_MIPS_XLATE 0x70000024
|
||||
#define SHT_MIPS_XLATE_DEBUG 0x70000025
|
||||
#define SHT_MIPS_WHIRL 0x70000026
|
||||
#define SHT_MIPS_EH_REGION 0x70000027
|
||||
#define SHT_MIPS_XLATE_OLD 0x70000028
|
||||
#define SHT_MIPS_PDR_EXCEPTION 0x70000029
|
||||
|
||||
|
||||
|
||||
#define SHF_MIPS_GPREL 0x10000000
|
||||
#define SHF_MIPS_MERGE 0x20000000
|
||||
#define SHF_MIPS_ADDR 0x40000000
|
||||
#define SHF_MIPS_STRINGS 0x80000000
|
||||
#define SHF_MIPS_NOSTRIP 0x08000000
|
||||
#define SHF_MIPS_LOCAL 0x04000000
|
||||
#define SHF_MIPS_NAMES 0x02000000
|
||||
#define SHF_MIPS_NODUPE 0x01000000
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define STO_MIPS_DEFAULT 0x0
|
||||
#define STO_MIPS_INTERNAL 0x1
|
||||
#define STO_MIPS_HIDDEN 0x2
|
||||
#define STO_MIPS_PROTECTED 0x3
|
||||
#define STO_MIPS_PLT 0x8
|
||||
#define STO_MIPS_SC_ALIGN_UNUSED 0xff
|
||||
|
||||
|
||||
#define STB_MIPS_SPLIT_COMMON 13
|
||||
|
||||
|
||||
|
||||
typedef union {
|
||||
struct {
|
||||
Elf32_Word gt_current_g_value;
|
||||
Elf32_Word gt_unused;
|
||||
} gt_header;
|
||||
struct {
|
||||
Elf32_Word gt_g_value;
|
||||
Elf32_Word gt_bytes;
|
||||
} gt_entry;
|
||||
} Elf32_gptab;
|
||||
|
||||
|
||||
|
||||
typedef struct {
|
||||
Elf32_Word ri_gprmask;
|
||||
Elf32_Word ri_cprmask[4];
|
||||
Elf32_Sword ri_gp_value;
|
||||
} Elf32_RegInfo;
|
||||
|
||||
|
||||
|
||||
typedef struct {
|
||||
unsigned char kind;
|
||||
|
||||
unsigned char size;
|
||||
Elf32_Section section;
|
||||
|
||||
Elf32_Word info;
|
||||
} Elf_Options;
|
||||
|
||||
|
||||
|
||||
#define ODK_NULL 0
|
||||
#define ODK_REGINFO 1
|
||||
#define ODK_EXCEPTIONS 2
|
||||
#define ODK_PAD 3
|
||||
#define ODK_HWPATCH 4
|
||||
#define ODK_FILL 5
|
||||
#define ODK_TAGS 6
|
||||
#define ODK_HWAND 7
|
||||
#define ODK_HWOR 8
|
||||
|
||||
|
||||
|
||||
#define OEX_FPU_MIN 0x1f
|
||||
#define OEX_FPU_MAX 0x1f00
|
||||
#define OEX_PAGE0 0x10000
|
||||
#define OEX_SMM 0x20000
|
||||
#define OEX_FPDBUG 0x40000
|
||||
#define OEX_PRECISEFP OEX_FPDBUG
|
||||
#define OEX_DISMISS 0x80000
|
||||
|
||||
#define OEX_FPU_INVAL 0x10
|
||||
#define OEX_FPU_DIV0 0x08
|
||||
#define OEX_FPU_OFLO 0x04
|
||||
#define OEX_FPU_UFLO 0x02
|
||||
#define OEX_FPU_INEX 0x01
|
||||
|
||||
|
||||
|
||||
#define OHW_R4KEOP 0x1
|
||||
#define OHW_R8KPFETCH 0x2
|
||||
#define OHW_R5KEOP 0x4
|
||||
#define OHW_R5KCVTL 0x8
|
||||
|
||||
#define OPAD_PREFIX 0x1
|
||||
#define OPAD_POSTFIX 0x2
|
||||
#define OPAD_SYMBOL 0x4
|
||||
|
||||
|
||||
|
||||
typedef struct {
|
||||
Elf32_Word hwp_flags1;
|
||||
Elf32_Word hwp_flags2;
|
||||
} Elf_Options_Hw;
|
||||
|
||||
|
||||
|
||||
#define OHWA0_R4KEOP_CHECKED 0x00000001
|
||||
#define OHWA1_R4KEOP_CLEAN 0x00000002
|
||||
|
||||
|
||||
|
||||
#define R_MIPS_NONE 0
|
||||
#define R_MIPS_16 1
|
||||
#define R_MIPS_32 2
|
||||
#define R_MIPS_REL32 3
|
||||
#define R_MIPS_26 4
|
||||
#define R_MIPS_HI16 5
|
||||
#define R_MIPS_LO16 6
|
||||
#define R_MIPS_GPREL16 7
|
||||
#define R_MIPS_LITERAL 8
|
||||
#define R_MIPS_GOT16 9
|
||||
#define R_MIPS_PC16 10
|
||||
#define R_MIPS_CALL16 11
|
||||
#define R_MIPS_GPREL32 12
|
||||
|
||||
#define R_MIPS_SHIFT5 16
|
||||
#define R_MIPS_SHIFT6 17
|
||||
#define R_MIPS_64 18
|
||||
#define R_MIPS_GOT_DISP 19
|
||||
#define R_MIPS_GOT_PAGE 20
|
||||
#define R_MIPS_GOT_OFST 21
|
||||
#define R_MIPS_GOT_HI16 22
|
||||
#define R_MIPS_GOT_LO16 23
|
||||
#define R_MIPS_SUB 24
|
||||
#define R_MIPS_INSERT_A 25
|
||||
#define R_MIPS_INSERT_B 26
|
||||
#define R_MIPS_DELETE 27
|
||||
#define R_MIPS_HIGHER 28
|
||||
#define R_MIPS_HIGHEST 29
|
||||
#define R_MIPS_CALL_HI16 30
|
||||
#define R_MIPS_CALL_LO16 31
|
||||
#define R_MIPS_SCN_DISP 32
|
||||
#define R_MIPS_REL16 33
|
||||
#define R_MIPS_ADD_IMMEDIATE 34
|
||||
#define R_MIPS_PJUMP 35
|
||||
#define R_MIPS_RELGOT 36
|
||||
#define R_MIPS_JALR 37
|
||||
#define R_MIPS_TLS_DTPMOD32 38
|
||||
#define R_MIPS_TLS_DTPREL32 39
|
||||
#define R_MIPS_TLS_DTPMOD64 40
|
||||
#define R_MIPS_TLS_DTPREL64 41
|
||||
#define R_MIPS_TLS_GD 42
|
||||
#define R_MIPS_TLS_LDM 43
|
||||
#define R_MIPS_TLS_DTPREL_HI16 44
|
||||
#define R_MIPS_TLS_DTPREL_LO16 45
|
||||
#define R_MIPS_TLS_GOTTPREL 46
|
||||
#define R_MIPS_TLS_TPREL32 47
|
||||
#define R_MIPS_TLS_TPREL64 48
|
||||
#define R_MIPS_TLS_TPREL_HI16 49
|
||||
#define R_MIPS_TLS_TPREL_LO16 50
|
||||
#define R_MIPS_GLOB_DAT 51
|
||||
#define R_MIPS_COPY 126
|
||||
#define R_MIPS_JUMP_SLOT 127
|
||||
|
||||
#define R_MIPS_NUM 128
|
||||
|
||||
|
||||
|
||||
#define PT_MIPS_REGINFO 0x70000000
|
||||
#define PT_MIPS_RTPROC 0x70000001
|
||||
#define PT_MIPS_OPTIONS 0x70000002
|
||||
#define PT_MIPS_ABIFLAGS 0x70000003
|
||||
|
||||
|
||||
|
||||
#define PF_MIPS_LOCAL 0x10000000
|
||||
|
||||
|
||||
|
||||
#define DT_MIPS_RLD_VERSION 0x70000001
|
||||
#define DT_MIPS_TIME_STAMP 0x70000002
|
||||
#define DT_MIPS_ICHECKSUM 0x70000003
|
||||
#define DT_MIPS_IVERSION 0x70000004
|
||||
#define DT_MIPS_FLAGS 0x70000005
|
||||
#define DT_MIPS_BASE_ADDRESS 0x70000006
|
||||
#define DT_MIPS_MSYM 0x70000007
|
||||
#define DT_MIPS_CONFLICT 0x70000008
|
||||
#define DT_MIPS_LIBLIST 0x70000009
|
||||
#define DT_MIPS_LOCAL_GOTNO 0x7000000a
|
||||
#define DT_MIPS_CONFLICTNO 0x7000000b
|
||||
#define DT_MIPS_LIBLISTNO 0x70000010
|
||||
#define DT_MIPS_SYMTABNO 0x70000011
|
||||
#define DT_MIPS_UNREFEXTNO 0x70000012
|
||||
#define DT_MIPS_GOTSYM 0x70000013
|
||||
#define DT_MIPS_HIPAGENO 0x70000014
|
||||
#define DT_MIPS_RLD_MAP 0x70000016
|
||||
#define DT_MIPS_DELTA_CLASS 0x70000017
|
||||
#define DT_MIPS_DELTA_CLASS_NO 0x70000018
|
||||
|
||||
#define DT_MIPS_DELTA_INSTANCE 0x70000019
|
||||
#define DT_MIPS_DELTA_INSTANCE_NO 0x7000001a
|
||||
|
||||
#define DT_MIPS_DELTA_RELOC 0x7000001b
|
||||
#define DT_MIPS_DELTA_RELOC_NO 0x7000001c
|
||||
|
||||
#define DT_MIPS_DELTA_SYM 0x7000001d
|
||||
|
||||
#define DT_MIPS_DELTA_SYM_NO 0x7000001e
|
||||
|
||||
#define DT_MIPS_DELTA_CLASSSYM 0x70000020
|
||||
|
||||
#define DT_MIPS_DELTA_CLASSSYM_NO 0x70000021
|
||||
|
||||
#define DT_MIPS_CXX_FLAGS 0x70000022
|
||||
#define DT_MIPS_PIXIE_INIT 0x70000023
|
||||
#define DT_MIPS_SYMBOL_LIB 0x70000024
|
||||
#define DT_MIPS_LOCALPAGE_GOTIDX 0x70000025
|
||||
#define DT_MIPS_LOCAL_GOTIDX 0x70000026
|
||||
#define DT_MIPS_HIDDEN_GOTIDX 0x70000027
|
||||
#define DT_MIPS_PROTECTED_GOTIDX 0x70000028
|
||||
#define DT_MIPS_OPTIONS 0x70000029
|
||||
#define DT_MIPS_INTERFACE 0x7000002a
|
||||
#define DT_MIPS_DYNSTR_ALIGN 0x7000002b
|
||||
#define DT_MIPS_INTERFACE_SIZE 0x7000002c
|
||||
#define DT_MIPS_RLD_TEXT_RESOLVE_ADDR 0x7000002d
|
||||
|
||||
#define DT_MIPS_PERF_SUFFIX 0x7000002e
|
||||
|
||||
#define DT_MIPS_COMPACT_SIZE 0x7000002f
|
||||
#define DT_MIPS_GP_VALUE 0x70000030
|
||||
#define DT_MIPS_AUX_DYNAMIC 0x70000031
|
||||
|
||||
#define DT_MIPS_PLTGOT 0x70000032
|
||||
|
||||
#define DT_MIPS_RWPLT 0x70000034
|
||||
#define DT_MIPS_RLD_MAP_REL 0x70000035
|
||||
#define DT_MIPS_NUM 0x36
|
||||
|
||||
|
||||
|
||||
#define RHF_NONE 0
|
||||
#define RHF_QUICKSTART (1 << 0)
|
||||
#define RHF_NOTPOT (1 << 1)
|
||||
#define RHF_NO_LIBRARY_REPLACEMENT (1 << 2)
|
||||
#define RHF_NO_MOVE (1 << 3)
|
||||
#define RHF_SGI_ONLY (1 << 4)
|
||||
#define RHF_GUARANTEE_INIT (1 << 5)
|
||||
#define RHF_DELTA_C_PLUS_PLUS (1 << 6)
|
||||
#define RHF_GUARANTEE_START_INIT (1 << 7)
|
||||
#define RHF_PIXIE (1 << 8)
|
||||
#define RHF_DEFAULT_DELAY_LOAD (1 << 9)
|
||||
#define RHF_REQUICKSTART (1 << 10)
|
||||
#define RHF_REQUICKSTARTED (1 << 11)
|
||||
#define RHF_CORD (1 << 12)
|
||||
#define RHF_NO_UNRES_UNDEF (1 << 13)
|
||||
#define RHF_RLD_ORDER_SAFE (1 << 14)
|
||||
|
||||
|
||||
|
||||
typedef struct {
|
||||
Elf32_Word l_name;
|
||||
Elf32_Word l_time_stamp;
|
||||
Elf32_Word l_checksum;
|
||||
Elf32_Word l_version;
|
||||
Elf32_Word l_flags;
|
||||
} Elf32_Lib;
|
||||
|
||||
typedef struct {
|
||||
Elf64_Word l_name;
|
||||
Elf64_Word l_time_stamp;
|
||||
Elf64_Word l_checksum;
|
||||
Elf64_Word l_version;
|
||||
Elf64_Word l_flags;
|
||||
} Elf64_Lib;
|
||||
|
||||
|
||||
|
||||
|
||||
#define LL_NONE 0
|
||||
#define LL_EXACT_MATCH (1 << 0)
|
||||
#define LL_IGNORE_INT_VER (1 << 1)
|
||||
#define LL_REQUIRE_MINOR (1 << 2)
|
||||
#define LL_EXPORTS (1 << 3)
|
||||
#define LL_DELAY_LOAD (1 << 4)
|
||||
#define LL_DELTA (1 << 5)
|
||||
|
||||
|
||||
|
||||
typedef Elf32_Addr Elf32_Conflict;
|
||||
|
||||
typedef struct {
|
||||
Elf32_Half version;
|
||||
unsigned char isa_level;
|
||||
unsigned char isa_rev;
|
||||
unsigned char gpr_size;
|
||||
unsigned char cpr1_size;
|
||||
unsigned char cpr2_size;
|
||||
unsigned char fp_abi;
|
||||
Elf32_Word isa_ext;
|
||||
Elf32_Word ases;
|
||||
Elf32_Word flags1;
|
||||
Elf32_Word flags2;
|
||||
} Elf_MIPS_ABIFlags_v0;
|
||||
|
||||
#define MIPS_AFL_REG_NONE 0x00
|
||||
#define MIPS_AFL_REG_32 0x01
|
||||
#define MIPS_AFL_REG_64 0x02
|
||||
#define MIPS_AFL_REG_128 0x03
|
||||
|
||||
#define MIPS_AFL_ASE_DSP 0x00000001
|
||||
#define MIPS_AFL_ASE_DSPR2 0x00000002
|
||||
#define MIPS_AFL_ASE_EVA 0x00000004
|
||||
#define MIPS_AFL_ASE_MCU 0x00000008
|
||||
#define MIPS_AFL_ASE_MDMX 0x00000010
|
||||
#define MIPS_AFL_ASE_MIPS3D 0x00000020
|
||||
#define MIPS_AFL_ASE_MT 0x00000040
|
||||
#define MIPS_AFL_ASE_SMARTMIPS 0x00000080
|
||||
#define MIPS_AFL_ASE_VIRT 0x00000100
|
||||
#define MIPS_AFL_ASE_MSA 0x00000200
|
||||
#define MIPS_AFL_ASE_MIPS16 0x00000400
|
||||
#define MIPS_AFL_ASE_MICROMIPS 0x00000800
|
||||
#define MIPS_AFL_ASE_XPA 0x00001000
|
||||
#define MIPS_AFL_ASE_MASK 0x00001fff
|
||||
|
||||
#define MIPS_AFL_EXT_XLR 1
|
||||
#define MIPS_AFL_EXT_OCTEON2 2
|
||||
#define MIPS_AFL_EXT_OCTEONP 3
|
||||
#define MIPS_AFL_EXT_LOONGSON_3A 4
|
||||
#define MIPS_AFL_EXT_OCTEON 5
|
||||
#define MIPS_AFL_EXT_5900 6
|
||||
#define MIPS_AFL_EXT_4650 7
|
||||
#define MIPS_AFL_EXT_4010 8
|
||||
#define MIPS_AFL_EXT_4100 9
|
||||
#define MIPS_AFL_EXT_3900 10
|
||||
#define MIPS_AFL_EXT_10000 11
|
||||
#define MIPS_AFL_EXT_SB1 12
|
||||
#define MIPS_AFL_EXT_4111 13
|
||||
#define MIPS_AFL_EXT_4120 14
|
||||
#define MIPS_AFL_EXT_5400 15
|
||||
#define MIPS_AFL_EXT_5500 16
|
||||
#define MIPS_AFL_EXT_LOONGSON_2E 17
|
||||
#define MIPS_AFL_EXT_LOONGSON_2F 18
|
||||
|
||||
#define MIPS_AFL_FLAGS1_ODDSPREG 1
|
||||
|
||||
enum
|
||||
{
|
||||
Val_GNU_MIPS_ABI_FP_ANY = 0,
|
||||
Val_GNU_MIPS_ABI_FP_DOUBLE = 1,
|
||||
Val_GNU_MIPS_ABI_FP_SINGLE = 2,
|
||||
Val_GNU_MIPS_ABI_FP_SOFT = 3,
|
||||
Val_GNU_MIPS_ABI_FP_OLD_64 = 4,
|
||||
Val_GNU_MIPS_ABI_FP_XX = 5,
|
||||
Val_GNU_MIPS_ABI_FP_64 = 6,
|
||||
Val_GNU_MIPS_ABI_FP_64A = 7,
|
||||
Val_GNU_MIPS_ABI_FP_MAX = 7
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
#define EF_PARISC_TRAPNIL 0x00010000
|
||||
#define EF_PARISC_EXT 0x00020000
|
||||
#define EF_PARISC_LSB 0x00040000
|
||||
#define EF_PARISC_WIDE 0x00080000
|
||||
#define EF_PARISC_NO_KABP 0x00100000
|
||||
|
||||
#define EF_PARISC_LAZYSWAP 0x00400000
|
||||
#define EF_PARISC_ARCH 0x0000ffff
|
||||
|
||||
|
||||
|
||||
#define EFA_PARISC_1_0 0x020b
|
||||
#define EFA_PARISC_1_1 0x0210
|
||||
#define EFA_PARISC_2_0 0x0214
|
||||
|
||||
|
||||
|
||||
#define SHN_PARISC_ANSI_COMMON 0xff00
|
||||
|
||||
#define SHN_PARISC_HUGE_COMMON 0xff01
|
||||
|
||||
|
||||
|
||||
#define SHT_PARISC_EXT 0x70000000
|
||||
#define SHT_PARISC_UNWIND 0x70000001
|
||||
#define SHT_PARISC_DOC 0x70000002
|
||||
|
||||
|
||||
|
||||
#define SHF_PARISC_SHORT 0x20000000
|
||||
#define SHF_PARISC_HUGE 0x40000000
|
||||
#define SHF_PARISC_SBP 0x80000000
|
||||
|
||||
|
||||
|
||||
#define STT_PARISC_MILLICODE 13
|
||||
|
||||
#define STT_HP_OPAQUE (STT_LOOS + 0x1)
|
||||
#define STT_HP_STUB (STT_LOOS + 0x2)
|
||||
|
||||
|
||||
|
||||
#define R_PARISC_NONE 0
|
||||
#define R_PARISC_DIR32 1
|
||||
#define R_PARISC_DIR21L 2
|
||||
#define R_PARISC_DIR17R 3
|
||||
#define R_PARISC_DIR17F 4
|
||||
#define R_PARISC_DIR14R 6
|
||||
#define R_PARISC_PCREL32 9
|
||||
#define R_PARISC_PCREL21L 10
|
||||
#define R_PARISC_PCREL17R 11
|
||||
#define R_PARISC_PCREL17F 12
|
||||
#define R_PARISC_PCREL14R 14
|
||||
#define R_PARISC_DPREL21L 18
|
||||
#define R_PARISC_DPREL14R 22
|
||||
#define R_PARISC_GPREL21L 26
|
||||
#define R_PARISC_GPREL14R 30
|
||||
#define R_PARISC_LTOFF21L 34
|
||||
#define R_PARISC_LTOFF14R 38
|
||||
#define R_PARISC_SECREL32 41
|
||||
#define R_PARISC_SEGBASE 48
|
||||
#define R_PARISC_SEGREL32 49
|
||||
#define R_PARISC_PLTOFF21L 50
|
||||
#define R_PARISC_PLTOFF14R 54
|
||||
#define R_PARISC_LTOFF_FPTR32 57
|
||||
#define R_PARISC_LTOFF_FPTR21L 58
|
||||
#define R_PARISC_LTOFF_FPTR14R 62
|
||||
#define R_PARISC_FPTR64 64
|
||||
#define R_PARISC_PLABEL32 65
|
||||
#define R_PARISC_PLABEL21L 66
|
||||
#define R_PARISC_PLABEL14R 70
|
||||
#define R_PARISC_PCREL64 72
|
||||
#define R_PARISC_PCREL22F 74
|
||||
#define R_PARISC_PCREL14WR 75
|
||||
#define R_PARISC_PCREL14DR 76
|
||||
#define R_PARISC_PCREL16F 77
|
||||
#define R_PARISC_PCREL16WF 78
|
||||
#define R_PARISC_PCREL16DF 79
|
||||
#define R_PARISC_DIR64 80
|
||||
#define R_PARISC_DIR14WR 83
|
||||
#define R_PARISC_DIR14DR 84
|
||||
#define R_PARISC_DIR16F 85
|
||||
#define R_PARISC_DIR16WF 86
|
||||
#define R_PARISC_DIR16DF 87
|
||||
#define R_PARISC_GPREL64 88
|
||||
#define R_PARISC_GPREL14WR 91
|
||||
#define R_PARISC_GPREL14DR 92
|
||||
#define R_PARISC_GPREL16F 93
|
||||
#define R_PARISC_GPREL16WF 94
|
||||
#define R_PARISC_GPREL16DF 95
|
||||
#define R_PARISC_LTOFF64 96
|
||||
#define R_PARISC_LTOFF14WR 99
|
||||
#define R_PARISC_LTOFF14DR 100
|
||||
#define R_PARISC_LTOFF16F 101
|
||||
#define R_PARISC_LTOFF16WF 102
|
||||
#define R_PARISC_LTOFF16DF 103
|
||||
#define R_PARISC_SECREL64 104
|
||||
#define R_PARISC_SEGREL64 112
|
||||
#define R_PARISC_PLTOFF14WR 115
|
||||
#define R_PARISC_PLTOFF14DR 116
|
||||
#define R_PARISC_PLTOFF16F 117
|
||||
#define R_PARISC_PLTOFF16WF 118
|
||||
#define R_PARISC_PLTOFF16DF 119
|
||||
#define R_PARISC_LTOFF_FPTR64 120
|
||||
#define R_PARISC_LTOFF_FPTR14WR 123
|
||||
#define R_PARISC_LTOFF_FPTR14DR 124
|
||||
#define R_PARISC_LTOFF_FPTR16F 125
|
||||
#define R_PARISC_LTOFF_FPTR16WF 126
|
||||
#define R_PARISC_LTOFF_FPTR16DF 127
|
||||
#define R_PARISC_LORESERVE 128
|
||||
#define R_PARISC_COPY 128
|
||||
#define R_PARISC_IPLT 129
|
||||
#define R_PARISC_EPLT 130
|
||||
#define R_PARISC_TPREL32 153
|
||||
#define R_PARISC_TPREL21L 154
|
||||
#define R_PARISC_TPREL14R 158
|
||||
#define R_PARISC_LTOFF_TP21L 162
|
||||
#define R_PARISC_LTOFF_TP14R 166
|
||||
#define R_PARISC_LTOFF_TP14F 167
|
||||
#define R_PARISC_TPREL64 216
|
||||
#define R_PARISC_TPREL14WR 219
|
||||
#define R_PARISC_TPREL14DR 220
|
||||
#define R_PARISC_TPREL16F 221
|
||||
#define R_PARISC_TPREL16WF 222
|
||||
#define R_PARISC_TPREL16DF 223
|
||||
#define R_PARISC_LTOFF_TP64 224
|
||||
#define R_PARISC_LTOFF_TP14WR 227
|
||||
#define R_PARISC_LTOFF_TP14DR 228
|
||||
#define R_PARISC_LTOFF_TP16F 229
|
||||
#define R_PARISC_LTOFF_TP16WF 230
|
||||
#define R_PARISC_LTOFF_TP16DF 231
|
||||
#define R_PARISC_GNU_VTENTRY 232
|
||||
#define R_PARISC_GNU_VTINHERIT 233
|
||||
#define R_PARISC_TLS_GD21L 234
|
||||
#define R_PARISC_TLS_GD14R 235
|
||||
#define R_PARISC_TLS_GDCALL 236
|
||||
#define R_PARISC_TLS_LDM21L 237
|
||||
#define R_PARISC_TLS_LDM14R 238
|
||||
#define R_PARISC_TLS_LDMCALL 239
|
||||
#define R_PARISC_TLS_LDO21L 240
|
||||
#define R_PARISC_TLS_LDO14R 241
|
||||
#define R_PARISC_TLS_DTPMOD32 242
|
||||
#define R_PARISC_TLS_DTPMOD64 243
|
||||
#define R_PARISC_TLS_DTPOFF32 244
|
||||
#define R_PARISC_TLS_DTPOFF64 245
|
||||
#define R_PARISC_TLS_LE21L R_PARISC_TPREL21L
|
||||
#define R_PARISC_TLS_LE14R R_PARISC_TPREL14R
|
||||
#define R_PARISC_TLS_IE21L R_PARISC_LTOFF_TP21L
|
||||
#define R_PARISC_TLS_IE14R R_PARISC_LTOFF_TP14R
|
||||
#define R_PARISC_TLS_TPREL32 R_PARISC_TPREL32
|
||||
#define R_PARISC_TLS_TPREL64 R_PARISC_TPREL64
|
||||
#define R_PARISC_HIRESERVE 255
|
||||
|
||||
|
||||
|
||||
#define PT_HP_TLS (PT_LOOS + 0x0)
|
||||
#define PT_HP_CORE_NONE (PT_LOOS + 0x1)
|
||||
#define PT_HP_CORE_VERSION (PT_LOOS + 0x2)
|
||||
#define PT_HP_CORE_KERNEL (PT_LOOS + 0x3)
|
||||
#define PT_HP_CORE_COMM (PT_LOOS + 0x4)
|
||||
#define PT_HP_CORE_PROC (PT_LOOS + 0x5)
|
||||
#define PT_HP_CORE_LOADABLE (PT_LOOS + 0x6)
|
||||
#define PT_HP_CORE_STACK (PT_LOOS + 0x7)
|
||||
#define PT_HP_CORE_SHM (PT_LOOS + 0x8)
|
||||
#define PT_HP_CORE_MMF (PT_LOOS + 0x9)
|
||||
#define PT_HP_PARALLEL (PT_LOOS + 0x10)
|
||||
#define PT_HP_FASTBIND (PT_LOOS + 0x11)
|
||||
#define PT_HP_OPT_ANNOT (PT_LOOS + 0x12)
|
||||
#define PT_HP_HSL_ANNOT (PT_LOOS + 0x13)
|
||||
#define PT_HP_STACK (PT_LOOS + 0x14)
|
||||
|
||||
#define PT_PARISC_ARCHEXT 0x70000000
|
||||
#define PT_PARISC_UNWIND 0x70000001
|
||||
|
||||
|
||||
|
||||
#define PF_PARISC_SBP 0x08000000
|
||||
|
||||
#define PF_HP_PAGE_SIZE 0x00100000
|
||||
#define PF_HP_FAR_SHARED 0x00200000
|
||||
#define PF_HP_NEAR_SHARED 0x00400000
|
||||
#define PF_HP_CODE 0x01000000
|
||||
#define PF_HP_MODIFY 0x02000000
|
||||
#define PF_HP_LAZYSWAP 0x04000000
|
||||
#define PF_HP_SBP 0x08000000
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define EF_ALPHA_32BIT 1
|
||||
#define EF_ALPHA_CANRELAX 2
|
||||
|
||||
|
||||
|
||||
|
||||
#define SHT_ALPHA_DEBUG 0x70000001
|
||||
#define SHT_ALPHA_REGINFO 0x70000002
|
||||
|
||||
|
||||
|
||||
#define SHF_ALPHA_GPREL 0x10000000
|
||||
|
||||
|
||||
#define STO_ALPHA_NOPV 0x80
|
||||
#define STO_ALPHA_STD_GPLOAD 0x88
|
||||
|
||||
|
||||
|
||||
#define R_ALPHA_NONE 0
|
||||
#define R_ALPHA_REFLONG 1
|
||||
#define R_ALPHA_REFQUAD 2
|
||||
#define R_ALPHA_GPREL32 3
|
||||
#define R_ALPHA_LITERAL 4
|
||||
#define R_ALPHA_LITUSE 5
|
||||
#define R_ALPHA_GPDISP 6
|
||||
#define R_ALPHA_BRADDR 7
|
||||
#define R_ALPHA_HINT 8
|
||||
#define R_ALPHA_SREL16 9
|
||||
#define R_ALPHA_SREL32 10
|
||||
#define R_ALPHA_SREL64 11
|
||||
#define R_ALPHA_GPRELHIGH 17
|
||||
#define R_ALPHA_GPRELLOW 18
|
||||
#define R_ALPHA_GPREL16 19
|
||||
#define R_ALPHA_COPY 24
|
||||
#define R_ALPHA_GLOB_DAT 25
|
||||
#define R_ALPHA_JMP_SLOT 26
|
||||
#define R_ALPHA_RELATIVE 27
|
||||
#define R_ALPHA_TLS_GD_HI 28
|
||||
#define R_ALPHA_TLSGD 29
|
||||
#define R_ALPHA_TLS_LDM 30
|
||||
#define R_ALPHA_DTPMOD64 31
|
||||
#define R_ALPHA_GOTDTPREL 32
|
||||
#define R_ALPHA_DTPREL64 33
|
||||
#define R_ALPHA_DTPRELHI 34
|
||||
#define R_ALPHA_DTPRELLO 35
|
||||
#define R_ALPHA_DTPREL16 36
|
||||
#define R_ALPHA_GOTTPREL 37
|
||||
#define R_ALPHA_TPREL64 38
|
||||
#define R_ALPHA_TPRELHI 39
|
||||
#define R_ALPHA_TPRELLO 40
|
||||
#define R_ALPHA_TPREL16 41
|
||||
|
||||
#define R_ALPHA_NUM 46
|
||||
|
||||
|
||||
#define LITUSE_ALPHA_ADDR 0
|
||||
#define LITUSE_ALPHA_BASE 1
|
||||
#define LITUSE_ALPHA_BYTOFF 2
|
||||
#define LITUSE_ALPHA_JSR 3
|
||||
#define LITUSE_ALPHA_TLS_GD 4
|
||||
#define LITUSE_ALPHA_TLS_LDM 5
|
||||
|
||||
|
||||
#define DT_ALPHA_PLTRO (DT_LOPROC + 0)
|
||||
#define DT_ALPHA_NUM 1
|
||||
|
||||
|
||||
|
||||
|
||||
#define EF_PPC_EMB 0x80000000
|
||||
|
||||
|
||||
#define EF_PPC_RELOCATABLE 0x00010000
|
||||
#define EF_PPC_RELOCATABLE_LIB 0x00008000
|
||||
|
||||
|
||||
|
||||
#define R_PPC_NONE 0
|
||||
#define R_PPC_ADDR32 1
|
||||
#define R_PPC_ADDR24 2
|
||||
#define R_PPC_ADDR16 3
|
||||
#define R_PPC_ADDR16_LO 4
|
||||
#define R_PPC_ADDR16_HI 5
|
||||
#define R_PPC_ADDR16_HA 6
|
||||
#define R_PPC_ADDR14 7
|
||||
#define R_PPC_ADDR14_BRTAKEN 8
|
||||
#define R_PPC_ADDR14_BRNTAKEN 9
|
||||
#define R_PPC_REL24 10
|
||||
#define R_PPC_REL14 11
|
||||
#define R_PPC_REL14_BRTAKEN 12
|
||||
#define R_PPC_REL14_BRNTAKEN 13
|
||||
#define R_PPC_GOT16 14
|
||||
#define R_PPC_GOT16_LO 15
|
||||
#define R_PPC_GOT16_HI 16
|
||||
#define R_PPC_GOT16_HA 17
|
||||
#define R_PPC_PLTREL24 18
|
||||
#define R_PPC_COPY 19
|
||||
#define R_PPC_GLOB_DAT 20
|
||||
#define R_PPC_JMP_SLOT 21
|
||||
#define R_PPC_RELATIVE 22
|
||||
#define R_PPC_LOCAL24PC 23
|
||||
#define R_PPC_UADDR32 24
|
||||
#define R_PPC_UADDR16 25
|
||||
#define R_PPC_REL32 26
|
||||
#define R_PPC_PLT32 27
|
||||
#define R_PPC_PLTREL32 28
|
||||
#define R_PPC_PLT16_LO 29
|
||||
#define R_PPC_PLT16_HI 30
|
||||
#define R_PPC_PLT16_HA 31
|
||||
#define R_PPC_SDAREL16 32
|
||||
#define R_PPC_SECTOFF 33
|
||||
#define R_PPC_SECTOFF_LO 34
|
||||
#define R_PPC_SECTOFF_HI 35
|
||||
#define R_PPC_SECTOFF_HA 36
|
||||
|
||||
|
||||
#define R_PPC_TLS 67
|
||||
#define R_PPC_DTPMOD32 68
|
||||
#define R_PPC_TPREL16 69
|
||||
#define R_PPC_TPREL16_LO 70
|
||||
#define R_PPC_TPREL16_HI 71
|
||||
#define R_PPC_TPREL16_HA 72
|
||||
#define R_PPC_TPREL32 73
|
||||
#define R_PPC_DTPREL16 74
|
||||
#define R_PPC_DTPREL16_LO 75
|
||||
#define R_PPC_DTPREL16_HI 76
|
||||
#define R_PPC_DTPREL16_HA 77
|
||||
#define R_PPC_DTPREL32 78
|
||||
#define R_PPC_GOT_TLSGD16 79
|
||||
#define R_PPC_GOT_TLSGD16_LO 80
|
||||
#define R_PPC_GOT_TLSGD16_HI 81
|
||||
#define R_PPC_GOT_TLSGD16_HA 82
|
||||
#define R_PPC_GOT_TLSLD16 83
|
||||
#define R_PPC_GOT_TLSLD16_LO 84
|
||||
#define R_PPC_GOT_TLSLD16_HI 85
|
||||
#define R_PPC_GOT_TLSLD16_HA 86
|
||||
#define R_PPC_GOT_TPREL16 87
|
||||
#define R_PPC_GOT_TPREL16_LO 88
|
||||
#define R_PPC_GOT_TPREL16_HI 89
|
||||
#define R_PPC_GOT_TPREL16_HA 90
|
||||
#define R_PPC_GOT_DTPREL16 91
|
||||
#define R_PPC_GOT_DTPREL16_LO 92
|
||||
#define R_PPC_GOT_DTPREL16_HI 93
|
||||
#define R_PPC_GOT_DTPREL16_HA 94
|
||||
#define R_PPC_TLSGD 95
|
||||
#define R_PPC_TLSLD 96
|
||||
|
||||
|
||||
#define R_PPC_EMB_NADDR32 101
|
||||
#define R_PPC_EMB_NADDR16 102
|
||||
#define R_PPC_EMB_NADDR16_LO 103
|
||||
#define R_PPC_EMB_NADDR16_HI 104
|
||||
#define R_PPC_EMB_NADDR16_HA 105
|
||||
#define R_PPC_EMB_SDAI16 106
|
||||
#define R_PPC_EMB_SDA2I16 107
|
||||
#define R_PPC_EMB_SDA2REL 108
|
||||
#define R_PPC_EMB_SDA21 109
|
||||
#define R_PPC_EMB_MRKREF 110
|
||||
#define R_PPC_EMB_RELSEC16 111
|
||||
#define R_PPC_EMB_RELST_LO 112
|
||||
#define R_PPC_EMB_RELST_HI 113
|
||||
#define R_PPC_EMB_RELST_HA 114
|
||||
#define R_PPC_EMB_BIT_FLD 115
|
||||
#define R_PPC_EMB_RELSDA 116
|
||||
|
||||
|
||||
#define R_PPC_DIAB_SDA21_LO 180
|
||||
#define R_PPC_DIAB_SDA21_HI 181
|
||||
#define R_PPC_DIAB_SDA21_HA 182
|
||||
#define R_PPC_DIAB_RELSDA_LO 183
|
||||
#define R_PPC_DIAB_RELSDA_HI 184
|
||||
#define R_PPC_DIAB_RELSDA_HA 185
|
||||
|
||||
|
||||
#define R_PPC_IRELATIVE 248
|
||||
|
||||
|
||||
#define R_PPC_REL16 249
|
||||
#define R_PPC_REL16_LO 250
|
||||
#define R_PPC_REL16_HI 251
|
||||
#define R_PPC_REL16_HA 252
|
||||
|
||||
|
||||
|
||||
#define R_PPC_TOC16 255
|
||||
|
||||
|
||||
#define DT_PPC_GOT (DT_LOPROC + 0)
|
||||
#define DT_PPC_OPT (DT_LOPROC + 1)
|
||||
#define DT_PPC_NUM 2
|
||||
|
||||
#define PPC_OPT_TLS 1
|
||||
|
||||
|
||||
#define R_PPC64_NONE R_PPC_NONE
|
||||
#define R_PPC64_ADDR32 R_PPC_ADDR32
|
||||
#define R_PPC64_ADDR24 R_PPC_ADDR24
|
||||
#define R_PPC64_ADDR16 R_PPC_ADDR16
|
||||
#define R_PPC64_ADDR16_LO R_PPC_ADDR16_LO
|
||||
#define R_PPC64_ADDR16_HI R_PPC_ADDR16_HI
|
||||
#define R_PPC64_ADDR16_HA R_PPC_ADDR16_HA
|
||||
#define R_PPC64_ADDR14 R_PPC_ADDR14
|
||||
#define R_PPC64_ADDR14_BRTAKEN R_PPC_ADDR14_BRTAKEN
|
||||
#define R_PPC64_ADDR14_BRNTAKEN R_PPC_ADDR14_BRNTAKEN
|
||||
#define R_PPC64_REL24 R_PPC_REL24
|
||||
#define R_PPC64_REL14 R_PPC_REL14
|
||||
#define R_PPC64_REL14_BRTAKEN R_PPC_REL14_BRTAKEN
|
||||
#define R_PPC64_REL14_BRNTAKEN R_PPC_REL14_BRNTAKEN
|
||||
#define R_PPC64_GOT16 R_PPC_GOT16
|
||||
#define R_PPC64_GOT16_LO R_PPC_GOT16_LO
|
||||
#define R_PPC64_GOT16_HI R_PPC_GOT16_HI
|
||||
#define R_PPC64_GOT16_HA R_PPC_GOT16_HA
|
||||
|
||||
#define R_PPC64_COPY R_PPC_COPY
|
||||
#define R_PPC64_GLOB_DAT R_PPC_GLOB_DAT
|
||||
#define R_PPC64_JMP_SLOT R_PPC_JMP_SLOT
|
||||
#define R_PPC64_RELATIVE R_PPC_RELATIVE
|
||||
|
||||
#define R_PPC64_UADDR32 R_PPC_UADDR32
|
||||
#define R_PPC64_UADDR16 R_PPC_UADDR16
|
||||
#define R_PPC64_REL32 R_PPC_REL32
|
||||
#define R_PPC64_PLT32 R_PPC_PLT32
|
||||
#define R_PPC64_PLTREL32 R_PPC_PLTREL32
|
||||
#define R_PPC64_PLT16_LO R_PPC_PLT16_LO
|
||||
#define R_PPC64_PLT16_HI R_PPC_PLT16_HI
|
||||
#define R_PPC64_PLT16_HA R_PPC_PLT16_HA
|
||||
|
||||
#define R_PPC64_SECTOFF R_PPC_SECTOFF
|
||||
#define R_PPC64_SECTOFF_LO R_PPC_SECTOFF_LO
|
||||
#define R_PPC64_SECTOFF_HI R_PPC_SECTOFF_HI
|
||||
#define R_PPC64_SECTOFF_HA R_PPC_SECTOFF_HA
|
||||
#define R_PPC64_ADDR30 37
|
||||
#define R_PPC64_ADDR64 38
|
||||
#define R_PPC64_ADDR16_HIGHER 39
|
||||
#define R_PPC64_ADDR16_HIGHERA 40
|
||||
#define R_PPC64_ADDR16_HIGHEST 41
|
||||
#define R_PPC64_ADDR16_HIGHESTA 42
|
||||
#define R_PPC64_UADDR64 43
|
||||
#define R_PPC64_REL64 44
|
||||
#define R_PPC64_PLT64 45
|
||||
#define R_PPC64_PLTREL64 46
|
||||
#define R_PPC64_TOC16 47
|
||||
#define R_PPC64_TOC16_LO 48
|
||||
#define R_PPC64_TOC16_HI 49
|
||||
#define R_PPC64_TOC16_HA 50
|
||||
#define R_PPC64_TOC 51
|
||||
#define R_PPC64_PLTGOT16 52
|
||||
#define R_PPC64_PLTGOT16_LO 53
|
||||
#define R_PPC64_PLTGOT16_HI 54
|
||||
#define R_PPC64_PLTGOT16_HA 55
|
||||
|
||||
#define R_PPC64_ADDR16_DS 56
|
||||
#define R_PPC64_ADDR16_LO_DS 57
|
||||
#define R_PPC64_GOT16_DS 58
|
||||
#define R_PPC64_GOT16_LO_DS 59
|
||||
#define R_PPC64_PLT16_LO_DS 60
|
||||
#define R_PPC64_SECTOFF_DS 61
|
||||
#define R_PPC64_SECTOFF_LO_DS 62
|
||||
#define R_PPC64_TOC16_DS 63
|
||||
#define R_PPC64_TOC16_LO_DS 64
|
||||
#define R_PPC64_PLTGOT16_DS 65
|
||||
#define R_PPC64_PLTGOT16_LO_DS 66
|
||||
|
||||
|
||||
#define R_PPC64_TLS 67
|
||||
#define R_PPC64_DTPMOD64 68
|
||||
#define R_PPC64_TPREL16 69
|
||||
#define R_PPC64_TPREL16_LO 70
|
||||
#define R_PPC64_TPREL16_HI 71
|
||||
#define R_PPC64_TPREL16_HA 72
|
||||
#define R_PPC64_TPREL64 73
|
||||
#define R_PPC64_DTPREL16 74
|
||||
#define R_PPC64_DTPREL16_LO 75
|
||||
#define R_PPC64_DTPREL16_HI 76
|
||||
#define R_PPC64_DTPREL16_HA 77
|
||||
#define R_PPC64_DTPREL64 78
|
||||
#define R_PPC64_GOT_TLSGD16 79
|
||||
#define R_PPC64_GOT_TLSGD16_LO 80
|
||||
#define R_PPC64_GOT_TLSGD16_HI 81
|
||||
#define R_PPC64_GOT_TLSGD16_HA 82
|
||||
#define R_PPC64_GOT_TLSLD16 83
|
||||
#define R_PPC64_GOT_TLSLD16_LO 84
|
||||
#define R_PPC64_GOT_TLSLD16_HI 85
|
||||
#define R_PPC64_GOT_TLSLD16_HA 86
|
||||
#define R_PPC64_GOT_TPREL16_DS 87
|
||||
#define R_PPC64_GOT_TPREL16_LO_DS 88
|
||||
#define R_PPC64_GOT_TPREL16_HI 89
|
||||
#define R_PPC64_GOT_TPREL16_HA 90
|
||||
#define R_PPC64_GOT_DTPREL16_DS 91
|
||||
#define R_PPC64_GOT_DTPREL16_LO_DS 92
|
||||
#define R_PPC64_GOT_DTPREL16_HI 93
|
||||
#define R_PPC64_GOT_DTPREL16_HA 94
|
||||
#define R_PPC64_TPREL16_DS 95
|
||||
#define R_PPC64_TPREL16_LO_DS 96
|
||||
#define R_PPC64_TPREL16_HIGHER 97
|
||||
#define R_PPC64_TPREL16_HIGHERA 98
|
||||
#define R_PPC64_TPREL16_HIGHEST 99
|
||||
#define R_PPC64_TPREL16_HIGHESTA 100
|
||||
#define R_PPC64_DTPREL16_DS 101
|
||||
#define R_PPC64_DTPREL16_LO_DS 102
|
||||
#define R_PPC64_DTPREL16_HIGHER 103
|
||||
#define R_PPC64_DTPREL16_HIGHERA 104
|
||||
#define R_PPC64_DTPREL16_HIGHEST 105
|
||||
#define R_PPC64_DTPREL16_HIGHESTA 106
|
||||
#define R_PPC64_TLSGD 107
|
||||
#define R_PPC64_TLSLD 108
|
||||
#define R_PPC64_TOCSAVE 109
|
||||
#define R_PPC64_ADDR16_HIGH 110
|
||||
#define R_PPC64_ADDR16_HIGHA 111
|
||||
#define R_PPC64_TPREL16_HIGH 112
|
||||
#define R_PPC64_TPREL16_HIGHA 113
|
||||
#define R_PPC64_DTPREL16_HIGH 114
|
||||
#define R_PPC64_DTPREL16_HIGHA 115
|
||||
|
||||
|
||||
#define R_PPC64_JMP_IREL 247
|
||||
#define R_PPC64_IRELATIVE 248
|
||||
#define R_PPC64_REL16 249
|
||||
#define R_PPC64_REL16_LO 250
|
||||
#define R_PPC64_REL16_HI 251
|
||||
#define R_PPC64_REL16_HA 252
|
||||
|
||||
#define EF_PPC64_ABI 3
|
||||
|
||||
#define DT_PPC64_GLINK (DT_LOPROC + 0)
|
||||
#define DT_PPC64_OPD (DT_LOPROC + 1)
|
||||
#define DT_PPC64_OPDSZ (DT_LOPROC + 2)
|
||||
#define DT_PPC64_OPT (DT_LOPROC + 3)
|
||||
#define DT_PPC64_NUM 4
|
||||
|
||||
#define PPC64_OPT_TLS 1
|
||||
#define PPC64_OPT_MULTI_TOC 2
|
||||
#define PPC64_OPT_LOCALENTRY 4
|
||||
|
||||
#define STO_PPC64_LOCAL_BIT 5
|
||||
#define STO_PPC64_LOCAL_MASK 0xe0
|
||||
#define PPC64_LOCAL_ENTRY_OFFSET(x) (1 << (((x)&0xe0)>>5) & 0xfc)
|
||||
|
||||
|
||||
#define EF_ARM_RELEXEC 0x01
|
||||
#define EF_ARM_HASENTRY 0x02
|
||||
#define EF_ARM_INTERWORK 0x04
|
||||
#define EF_ARM_APCS_26 0x08
|
||||
#define EF_ARM_APCS_FLOAT 0x10
|
||||
#define EF_ARM_PIC 0x20
|
||||
#define EF_ARM_ALIGN8 0x40
|
||||
#define EF_ARM_NEW_ABI 0x80
|
||||
#define EF_ARM_OLD_ABI 0x100
|
||||
#define EF_ARM_SOFT_FLOAT 0x200
|
||||
#define EF_ARM_VFP_FLOAT 0x400
|
||||
#define EF_ARM_MAVERICK_FLOAT 0x800
|
||||
|
||||
#define EF_ARM_ABI_FLOAT_SOFT 0x200
|
||||
#define EF_ARM_ABI_FLOAT_HARD 0x400
|
||||
|
||||
|
||||
#define EF_ARM_SYMSARESORTED 0x04
|
||||
#define EF_ARM_DYNSYMSUSESEGIDX 0x08
|
||||
#define EF_ARM_MAPSYMSFIRST 0x10
|
||||
#define EF_ARM_EABIMASK 0XFF000000
|
||||
|
||||
|
||||
#define EF_ARM_BE8 0x00800000
|
||||
#define EF_ARM_LE8 0x00400000
|
||||
|
||||
#define EF_ARM_EABI_VERSION(flags) ((flags) & EF_ARM_EABIMASK)
|
||||
#define EF_ARM_EABI_UNKNOWN 0x00000000
|
||||
#define EF_ARM_EABI_VER1 0x01000000
|
||||
#define EF_ARM_EABI_VER2 0x02000000
|
||||
#define EF_ARM_EABI_VER3 0x03000000
|
||||
#define EF_ARM_EABI_VER4 0x04000000
|
||||
#define EF_ARM_EABI_VER5 0x05000000
|
||||
|
||||
|
||||
#define STT_ARM_TFUNC STT_LOPROC
|
||||
#define STT_ARM_16BIT STT_HIPROC
|
||||
|
||||
|
||||
#define SHF_ARM_ENTRYSECT 0x10000000
|
||||
#define SHF_ARM_COMDEF 0x80000000
|
||||
|
||||
|
||||
|
||||
#define PF_ARM_SB 0x10000000
|
||||
|
||||
#define PF_ARM_PI 0x20000000
|
||||
#define PF_ARM_ABS 0x40000000
|
||||
|
||||
|
||||
#define PT_ARM_EXIDX (PT_LOPROC + 1)
|
||||
|
||||
|
||||
#define SHT_ARM_EXIDX (SHT_LOPROC + 1)
|
||||
#define SHT_ARM_PREEMPTMAP (SHT_LOPROC + 2)
|
||||
#define SHT_ARM_ATTRIBUTES (SHT_LOPROC + 3)
|
||||
|
||||
#define R_AARCH64_NONE 0
|
||||
#define R_AARCH64_P32_ABS32 1
|
||||
#define R_AARCH64_P32_COPY 180
|
||||
#define R_AARCH64_P32_GLOB_DAT 181
|
||||
#define R_AARCH64_P32_JUMP_SLOT 182
|
||||
#define R_AARCH64_P32_RELATIVE 183
|
||||
#define R_AARCH64_P32_TLS_DTPMOD 184
|
||||
#define R_AARCH64_P32_TLS_DTPREL 185
|
||||
#define R_AARCH64_P32_TLS_TPREL 186
|
||||
#define R_AARCH64_P32_TLSDESC 187
|
||||
#define R_AARCH64_P32_IRELATIVE 188
|
||||
#define R_AARCH64_ABS64 257
|
||||
#define R_AARCH64_ABS32 258
|
||||
#define R_AARCH64_ABS16 259
|
||||
#define R_AARCH64_PREL64 260
|
||||
#define R_AARCH64_PREL32 261
|
||||
#define R_AARCH64_PREL16 262
|
||||
#define R_AARCH64_MOVW_UABS_G0 263
|
||||
#define R_AARCH64_MOVW_UABS_G0_NC 264
|
||||
#define R_AARCH64_MOVW_UABS_G1 265
|
||||
#define R_AARCH64_MOVW_UABS_G1_NC 266
|
||||
#define R_AARCH64_MOVW_UABS_G2 267
|
||||
#define R_AARCH64_MOVW_UABS_G2_NC 268
|
||||
#define R_AARCH64_MOVW_UABS_G3 269
|
||||
#define R_AARCH64_MOVW_SABS_G0 270
|
||||
#define R_AARCH64_MOVW_SABS_G1 271
|
||||
#define R_AARCH64_MOVW_SABS_G2 272
|
||||
#define R_AARCH64_LD_PREL_LO19 273
|
||||
#define R_AARCH64_ADR_PREL_LO21 274
|
||||
#define R_AARCH64_ADR_PREL_PG_HI21 275
|
||||
#define R_AARCH64_ADR_PREL_PG_HI21_NC 276
|
||||
#define R_AARCH64_ADD_ABS_LO12_NC 277
|
||||
#define R_AARCH64_LDST8_ABS_LO12_NC 278
|
||||
#define R_AARCH64_TSTBR14 279
|
||||
#define R_AARCH64_CONDBR19 280
|
||||
#define R_AARCH64_JUMP26 282
|
||||
#define R_AARCH64_CALL26 283
|
||||
#define R_AARCH64_LDST16_ABS_LO12_NC 284
|
||||
#define R_AARCH64_LDST32_ABS_LO12_NC 285
|
||||
#define R_AARCH64_LDST64_ABS_LO12_NC 286
|
||||
#define R_AARCH64_MOVW_PREL_G0 287
|
||||
#define R_AARCH64_MOVW_PREL_G0_NC 288
|
||||
#define R_AARCH64_MOVW_PREL_G1 289
|
||||
#define R_AARCH64_MOVW_PREL_G1_NC 290
|
||||
#define R_AARCH64_MOVW_PREL_G2 291
|
||||
#define R_AARCH64_MOVW_PREL_G2_NC 292
|
||||
#define R_AARCH64_MOVW_PREL_G3 293
|
||||
#define R_AARCH64_LDST128_ABS_LO12_NC 299
|
||||
#define R_AARCH64_MOVW_GOTOFF_G0 300
|
||||
#define R_AARCH64_MOVW_GOTOFF_G0_NC 301
|
||||
#define R_AARCH64_MOVW_GOTOFF_G1 302
|
||||
#define R_AARCH64_MOVW_GOTOFF_G1_NC 303
|
||||
#define R_AARCH64_MOVW_GOTOFF_G2 304
|
||||
#define R_AARCH64_MOVW_GOTOFF_G2_NC 305
|
||||
#define R_AARCH64_MOVW_GOTOFF_G3 306
|
||||
#define R_AARCH64_GOTREL64 307
|
||||
#define R_AARCH64_GOTREL32 308
|
||||
#define R_AARCH64_GOT_LD_PREL19 309
|
||||
#define R_AARCH64_LD64_GOTOFF_LO15 310
|
||||
#define R_AARCH64_ADR_GOT_PAGE 311
|
||||
#define R_AARCH64_LD64_GOT_LO12_NC 312
|
||||
#define R_AARCH64_LD64_GOTPAGE_LO15 313
|
||||
#define R_AARCH64_TLSGD_ADR_PREL21 512
|
||||
#define R_AARCH64_TLSGD_ADR_PAGE21 513
|
||||
#define R_AARCH64_TLSGD_ADD_LO12_NC 514
|
||||
#define R_AARCH64_TLSGD_MOVW_G1 515
|
||||
#define R_AARCH64_TLSGD_MOVW_G0_NC 516
|
||||
#define R_AARCH64_TLSLD_ADR_PREL21 517
|
||||
#define R_AARCH64_TLSLD_ADR_PAGE21 518
|
||||
#define R_AARCH64_TLSLD_ADD_LO12_NC 519
|
||||
#define R_AARCH64_TLSLD_MOVW_G1 520
|
||||
#define R_AARCH64_TLSLD_MOVW_G0_NC 521
|
||||
#define R_AARCH64_TLSLD_LD_PREL19 522
|
||||
#define R_AARCH64_TLSLD_MOVW_DTPREL_G2 523
|
||||
#define R_AARCH64_TLSLD_MOVW_DTPREL_G1 524
|
||||
#define R_AARCH64_TLSLD_MOVW_DTPREL_G1_NC 525
|
||||
#define R_AARCH64_TLSLD_MOVW_DTPREL_G0 526
|
||||
#define R_AARCH64_TLSLD_MOVW_DTPREL_G0_NC 527
|
||||
#define R_AARCH64_TLSLD_ADD_DTPREL_HI12 528
|
||||
#define R_AARCH64_TLSLD_ADD_DTPREL_LO12 529
|
||||
#define R_AARCH64_TLSLD_ADD_DTPREL_LO12_NC 530
|
||||
#define R_AARCH64_TLSLD_LDST8_DTPREL_LO12 531
|
||||
#define R_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC 532
|
||||
#define R_AARCH64_TLSLD_LDST16_DTPREL_LO12 533
|
||||
#define R_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC 534
|
||||
#define R_AARCH64_TLSLD_LDST32_DTPREL_LO12 535
|
||||
#define R_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC 536
|
||||
#define R_AARCH64_TLSLD_LDST64_DTPREL_LO12 537
|
||||
#define R_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC 538
|
||||
#define R_AARCH64_TLSIE_MOVW_GOTTPREL_G1 539
|
||||
#define R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC 540
|
||||
#define R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21 541
|
||||
#define R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC 542
|
||||
#define R_AARCH64_TLSIE_LD_GOTTPREL_PREL19 543
|
||||
#define R_AARCH64_TLSLE_MOVW_TPREL_G2 544
|
||||
#define R_AARCH64_TLSLE_MOVW_TPREL_G1 545
|
||||
#define R_AARCH64_TLSLE_MOVW_TPREL_G1_NC 546
|
||||
#define R_AARCH64_TLSLE_MOVW_TPREL_G0 547
|
||||
#define R_AARCH64_TLSLE_MOVW_TPREL_G0_NC 548
|
||||
#define R_AARCH64_TLSLE_ADD_TPREL_HI12 549
|
||||
#define R_AARCH64_TLSLE_ADD_TPREL_LO12 550
|
||||
#define R_AARCH64_TLSLE_ADD_TPREL_LO12_NC 551
|
||||
#define R_AARCH64_TLSLE_LDST8_TPREL_LO12 552
|
||||
#define R_AARCH64_TLSLE_LDST8_TPREL_LO12_NC 553
|
||||
#define R_AARCH64_TLSLE_LDST16_TPREL_LO12 554
|
||||
#define R_AARCH64_TLSLE_LDST16_TPREL_LO12_NC 555
|
||||
#define R_AARCH64_TLSLE_LDST32_TPREL_LO12 556
|
||||
#define R_AARCH64_TLSLE_LDST32_TPREL_LO12_NC 557
|
||||
#define R_AARCH64_TLSLE_LDST64_TPREL_LO12 558
|
||||
#define R_AARCH64_TLSLE_LDST64_TPREL_LO12_NC 559
|
||||
#define R_AARCH64_TLSDESC_LD_PREL19 560
|
||||
#define R_AARCH64_TLSDESC_ADR_PREL21 561
|
||||
#define R_AARCH64_TLSDESC_ADR_PAGE21 562
|
||||
#define R_AARCH64_TLSDESC_LD64_LO12 563
|
||||
#define R_AARCH64_TLSDESC_ADD_LO12 564
|
||||
#define R_AARCH64_TLSDESC_OFF_G1 565
|
||||
#define R_AARCH64_TLSDESC_OFF_G0_NC 566
|
||||
#define R_AARCH64_TLSDESC_LDR 567
|
||||
#define R_AARCH64_TLSDESC_ADD 568
|
||||
#define R_AARCH64_TLSDESC_CALL 569
|
||||
#define R_AARCH64_TLSLE_LDST128_TPREL_LO12 570
|
||||
#define R_AARCH64_TLSLE_LDST128_TPREL_LO12_NC 571
|
||||
#define R_AARCH64_TLSLD_LDST128_DTPREL_LO12 572
|
||||
#define R_AARCH64_TLSLD_LDST128_DTPREL_LO12_NC 573
|
||||
#define R_AARCH64_COPY 1024
|
||||
#define R_AARCH64_GLOB_DAT 1025
|
||||
#define R_AARCH64_JUMP_SLOT 1026
|
||||
#define R_AARCH64_RELATIVE 1027
|
||||
#define R_AARCH64_TLS_DTPMOD 1028
|
||||
#define R_AARCH64_TLS_DTPMOD64 1028
|
||||
#define R_AARCH64_TLS_DTPREL 1029
|
||||
#define R_AARCH64_TLS_DTPREL64 1029
|
||||
#define R_AARCH64_TLS_TPREL 1030
|
||||
#define R_AARCH64_TLS_TPREL64 1030
|
||||
#define R_AARCH64_TLSDESC 1031
|
||||
|
||||
|
||||
#define R_ARM_NONE 0
|
||||
#define R_ARM_PC24 1
|
||||
#define R_ARM_ABS32 2
|
||||
#define R_ARM_REL32 3
|
||||
#define R_ARM_PC13 4
|
||||
#define R_ARM_ABS16 5
|
||||
#define R_ARM_ABS12 6
|
||||
#define R_ARM_THM_ABS5 7
|
||||
#define R_ARM_ABS8 8
|
||||
#define R_ARM_SBREL32 9
|
||||
#define R_ARM_THM_PC22 10
|
||||
#define R_ARM_THM_PC8 11
|
||||
#define R_ARM_AMP_VCALL9 12
|
||||
#define R_ARM_TLS_DESC 13
|
||||
#define R_ARM_THM_SWI8 14
|
||||
#define R_ARM_XPC25 15
|
||||
#define R_ARM_THM_XPC22 16
|
||||
#define R_ARM_TLS_DTPMOD32 17
|
||||
#define R_ARM_TLS_DTPOFF32 18
|
||||
#define R_ARM_TLS_TPOFF32 19
|
||||
#define R_ARM_COPY 20
|
||||
#define R_ARM_GLOB_DAT 21
|
||||
#define R_ARM_JUMP_SLOT 22
|
||||
#define R_ARM_RELATIVE 23
|
||||
#define R_ARM_GOTOFF 24
|
||||
#define R_ARM_GOTPC 25
|
||||
#define R_ARM_GOT32 26
|
||||
#define R_ARM_PLT32 27
|
||||
#define R_ARM_CALL 28
|
||||
#define R_ARM_JUMP24 29
|
||||
#define R_ARM_THM_JUMP24 30
|
||||
#define R_ARM_BASE_ABS 31
|
||||
#define R_ARM_ALU_PCREL_7_0 32
|
||||
#define R_ARM_ALU_PCREL_15_8 33
|
||||
#define R_ARM_ALU_PCREL_23_15 34
|
||||
#define R_ARM_LDR_SBREL_11_0 35
|
||||
#define R_ARM_ALU_SBREL_19_12 36
|
||||
#define R_ARM_ALU_SBREL_27_20 37
|
||||
#define R_ARM_TARGET1 38
|
||||
#define R_ARM_SBREL31 39
|
||||
#define R_ARM_V4BX 40
|
||||
#define R_ARM_TARGET2 41
|
||||
#define R_ARM_PREL31 42
|
||||
#define R_ARM_MOVW_ABS_NC 43
|
||||
#define R_ARM_MOVT_ABS 44
|
||||
#define R_ARM_MOVW_PREL_NC 45
|
||||
#define R_ARM_MOVT_PREL 46
|
||||
#define R_ARM_THM_MOVW_ABS_NC 47
|
||||
#define R_ARM_THM_MOVT_ABS 48
|
||||
#define R_ARM_THM_MOVW_PREL_NC 49
|
||||
#define R_ARM_THM_MOVT_PREL 50
|
||||
#define R_ARM_THM_JUMP19 51
|
||||
#define R_ARM_THM_JUMP6 52
|
||||
#define R_ARM_THM_ALU_PREL_11_0 53
|
||||
#define R_ARM_THM_PC12 54
|
||||
#define R_ARM_ABS32_NOI 55
|
||||
#define R_ARM_REL32_NOI 56
|
||||
#define R_ARM_ALU_PC_G0_NC 57
|
||||
#define R_ARM_ALU_PC_G0 58
|
||||
#define R_ARM_ALU_PC_G1_NC 59
|
||||
#define R_ARM_ALU_PC_G1 60
|
||||
#define R_ARM_ALU_PC_G2 61
|
||||
#define R_ARM_LDR_PC_G1 62
|
||||
#define R_ARM_LDR_PC_G2 63
|
||||
#define R_ARM_LDRS_PC_G0 64
|
||||
#define R_ARM_LDRS_PC_G1 65
|
||||
#define R_ARM_LDRS_PC_G2 66
|
||||
#define R_ARM_LDC_PC_G0 67
|
||||
#define R_ARM_LDC_PC_G1 68
|
||||
#define R_ARM_LDC_PC_G2 69
|
||||
#define R_ARM_ALU_SB_G0_NC 70
|
||||
#define R_ARM_ALU_SB_G0 71
|
||||
#define R_ARM_ALU_SB_G1_NC 72
|
||||
#define R_ARM_ALU_SB_G1 73
|
||||
#define R_ARM_ALU_SB_G2 74
|
||||
#define R_ARM_LDR_SB_G0 75
|
||||
#define R_ARM_LDR_SB_G1 76
|
||||
#define R_ARM_LDR_SB_G2 77
|
||||
#define R_ARM_LDRS_SB_G0 78
|
||||
#define R_ARM_LDRS_SB_G1 79
|
||||
#define R_ARM_LDRS_SB_G2 80
|
||||
#define R_ARM_LDC_SB_G0 81
|
||||
#define R_ARM_LDC_SB_G1 82
|
||||
#define R_ARM_LDC_SB_G2 83
|
||||
#define R_ARM_MOVW_BREL_NC 84
|
||||
#define R_ARM_MOVT_BREL 85
|
||||
#define R_ARM_MOVW_BREL 86
|
||||
#define R_ARM_THM_MOVW_BREL_NC 87
|
||||
#define R_ARM_THM_MOVT_BREL 88
|
||||
#define R_ARM_THM_MOVW_BREL 89
|
||||
#define R_ARM_TLS_GOTDESC 90
|
||||
#define R_ARM_TLS_CALL 91
|
||||
#define R_ARM_TLS_DESCSEQ 92
|
||||
#define R_ARM_THM_TLS_CALL 93
|
||||
#define R_ARM_PLT32_ABS 94
|
||||
#define R_ARM_GOT_ABS 95
|
||||
#define R_ARM_GOT_PREL 96
|
||||
#define R_ARM_GOT_BREL12 97
|
||||
#define R_ARM_GOTOFF12 98
|
||||
#define R_ARM_GOTRELAX 99
|
||||
#define R_ARM_GNU_VTENTRY 100
|
||||
#define R_ARM_GNU_VTINHERIT 101
|
||||
#define R_ARM_THM_PC11 102
|
||||
#define R_ARM_THM_PC9 103
|
||||
#define R_ARM_TLS_GD32 104
|
||||
|
||||
#define R_ARM_TLS_LDM32 105
|
||||
|
||||
#define R_ARM_TLS_LDO32 106
|
||||
|
||||
#define R_ARM_TLS_IE32 107
|
||||
|
||||
#define R_ARM_TLS_LE32 108
|
||||
#define R_ARM_TLS_LDO12 109
|
||||
#define R_ARM_TLS_LE12 110
|
||||
#define R_ARM_TLS_IE12GP 111
|
||||
#define R_ARM_ME_TOO 128
|
||||
#define R_ARM_THM_TLS_DESCSEQ 129
|
||||
#define R_ARM_THM_TLS_DESCSEQ16 129
|
||||
#define R_ARM_THM_TLS_DESCSEQ32 130
|
||||
#define R_ARM_THM_GOT_BREL12 131
|
||||
#define R_ARM_IRELATIVE 160
|
||||
#define R_ARM_RXPC25 249
|
||||
#define R_ARM_RSBREL32 250
|
||||
#define R_ARM_THM_RPC22 251
|
||||
#define R_ARM_RREL32 252
|
||||
#define R_ARM_RABS22 253
|
||||
#define R_ARM_RPC24 254
|
||||
#define R_ARM_RBASE 255
|
||||
|
||||
#define R_ARM_NUM 256
|
||||
|
||||
|
||||
#define R_CKCORE_NONE 0
|
||||
#define R_CKCORE_ADDR32 1
|
||||
#define R_CKCORE_PCRELIMM8BY4 2
|
||||
#define R_CKCORE_PCRELIMM11BY2 3
|
||||
#define R_CKCORE_PCREL32 5
|
||||
#define R_CKCORE_PCRELJSR_IMM11BY2 6
|
||||
#define R_CKCORE_RELATIVE 9
|
||||
#define R_CKCORE_COPY 10
|
||||
#define R_CKCORE_GLOB_DAT 11
|
||||
#define R_CKCORE_JUMP_SLOT 12
|
||||
#define R_CKCORE_GOTOFF 13
|
||||
#define R_CKCORE_GOTPC 14
|
||||
#define R_CKCORE_GOT32 15
|
||||
#define R_CKCORE_PLT32 16
|
||||
#define R_CKCORE_ADDRGOT 17
|
||||
#define R_CKCORE_ADDRPLT 18
|
||||
#define R_CKCORE_PCREL_IMM26BY2 19
|
||||
#define R_CKCORE_PCREL_IMM16BY2 20
|
||||
#define R_CKCORE_PCREL_IMM16BY4 21
|
||||
#define R_CKCORE_PCREL_IMM10BY2 22
|
||||
#define R_CKCORE_PCREL_IMM10BY4 23
|
||||
#define R_CKCORE_ADDR_HI16 24
|
||||
#define R_CKCORE_ADDR_LO16 25
|
||||
#define R_CKCORE_GOTPC_HI16 26
|
||||
#define R_CKCORE_GOTPC_LO16 27
|
||||
#define R_CKCORE_GOTOFF_HI16 28
|
||||
#define R_CKCORE_GOTOFF_LO16 29
|
||||
#define R_CKCORE_GOT12 30
|
||||
#define R_CKCORE_GOT_HI16 31
|
||||
#define R_CKCORE_GOT_LO16 32
|
||||
#define R_CKCORE_PLT12 33
|
||||
#define R_CKCORE_PLT_HI16 34
|
||||
#define R_CKCORE_PLT_LO16 35
|
||||
#define R_CKCORE_ADDRGOT_HI16 36
|
||||
#define R_CKCORE_ADDRGOT_LO16 37
|
||||
#define R_CKCORE_ADDRPLT_HI16 38
|
||||
#define R_CKCORE_ADDRPLT_LO16 39
|
||||
#define R_CKCORE_PCREL_JSR_IMM26BY2 40
|
||||
#define R_CKCORE_TOFFSET_LO16 41
|
||||
#define R_CKCORE_DOFFSET_LO16 42
|
||||
#define R_CKCORE_PCREL_IMM18BY2 43
|
||||
#define R_CKCORE_DOFFSET_IMM18 44
|
||||
#define R_CKCORE_DOFFSET_IMM18BY2 45
|
||||
#define R_CKCORE_DOFFSET_IMM18BY4 46
|
||||
#define R_CKCORE_GOT_IMM18BY4 48
|
||||
#define R_CKCORE_PLT_IMM18BY4 49
|
||||
#define R_CKCORE_PCREL_IMM7BY4 50
|
||||
#define R_CKCORE_TLS_LE32 51
|
||||
#define R_CKCORE_TLS_IE32 52
|
||||
#define R_CKCORE_TLS_GD32 53
|
||||
#define R_CKCORE_TLS_LDM32 54
|
||||
#define R_CKCORE_TLS_LDO32 55
|
||||
#define R_CKCORE_TLS_DTPMOD32 56
|
||||
#define R_CKCORE_TLS_DTPOFF32 57
|
||||
#define R_CKCORE_TLS_TPOFF32 58
|
||||
|
||||
|
||||
#define EF_IA_64_MASKOS 0x0000000f
|
||||
#define EF_IA_64_ABI64 0x00000010
|
||||
#define EF_IA_64_ARCH 0xff000000
|
||||
|
||||
|
||||
#define PT_IA_64_ARCHEXT (PT_LOPROC + 0)
|
||||
#define PT_IA_64_UNWIND (PT_LOPROC + 1)
|
||||
#define PT_IA_64_HP_OPT_ANOT (PT_LOOS + 0x12)
|
||||
#define PT_IA_64_HP_HSL_ANOT (PT_LOOS + 0x13)
|
||||
#define PT_IA_64_HP_STACK (PT_LOOS + 0x14)
|
||||
|
||||
|
||||
#define PF_IA_64_NORECOV 0x80000000
|
||||
|
||||
|
||||
#define SHT_IA_64_EXT (SHT_LOPROC + 0)
|
||||
#define SHT_IA_64_UNWIND (SHT_LOPROC + 1)
|
||||
|
||||
|
||||
#define SHF_IA_64_SHORT 0x10000000
|
||||
#define SHF_IA_64_NORECOV 0x20000000
|
||||
|
||||
|
||||
#define DT_IA_64_PLT_RESERVE (DT_LOPROC + 0)
|
||||
#define DT_IA_64_NUM 1
|
||||
|
||||
|
||||
#define R_IA64_NONE 0x00
|
||||
#define R_IA64_IMM14 0x21
|
||||
#define R_IA64_IMM22 0x22
|
||||
#define R_IA64_IMM64 0x23
|
||||
#define R_IA64_DIR32MSB 0x24
|
||||
#define R_IA64_DIR32LSB 0x25
|
||||
#define R_IA64_DIR64MSB 0x26
|
||||
#define R_IA64_DIR64LSB 0x27
|
||||
#define R_IA64_GPREL22 0x2a
|
||||
#define R_IA64_GPREL64I 0x2b
|
||||
#define R_IA64_GPREL32MSB 0x2c
|
||||
#define R_IA64_GPREL32LSB 0x2d
|
||||
#define R_IA64_GPREL64MSB 0x2e
|
||||
#define R_IA64_GPREL64LSB 0x2f
|
||||
#define R_IA64_LTOFF22 0x32
|
||||
#define R_IA64_LTOFF64I 0x33
|
||||
#define R_IA64_PLTOFF22 0x3a
|
||||
#define R_IA64_PLTOFF64I 0x3b
|
||||
#define R_IA64_PLTOFF64MSB 0x3e
|
||||
#define R_IA64_PLTOFF64LSB 0x3f
|
||||
#define R_IA64_FPTR64I 0x43
|
||||
#define R_IA64_FPTR32MSB 0x44
|
||||
#define R_IA64_FPTR32LSB 0x45
|
||||
#define R_IA64_FPTR64MSB 0x46
|
||||
#define R_IA64_FPTR64LSB 0x47
|
||||
#define R_IA64_PCREL60B 0x48
|
||||
#define R_IA64_PCREL21B 0x49
|
||||
#define R_IA64_PCREL21M 0x4a
|
||||
#define R_IA64_PCREL21F 0x4b
|
||||
#define R_IA64_PCREL32MSB 0x4c
|
||||
#define R_IA64_PCREL32LSB 0x4d
|
||||
#define R_IA64_PCREL64MSB 0x4e
|
||||
#define R_IA64_PCREL64LSB 0x4f
|
||||
#define R_IA64_LTOFF_FPTR22 0x52
|
||||
#define R_IA64_LTOFF_FPTR64I 0x53
|
||||
#define R_IA64_LTOFF_FPTR32MSB 0x54
|
||||
#define R_IA64_LTOFF_FPTR32LSB 0x55
|
||||
#define R_IA64_LTOFF_FPTR64MSB 0x56
|
||||
#define R_IA64_LTOFF_FPTR64LSB 0x57
|
||||
#define R_IA64_SEGREL32MSB 0x5c
|
||||
#define R_IA64_SEGREL32LSB 0x5d
|
||||
#define R_IA64_SEGREL64MSB 0x5e
|
||||
#define R_IA64_SEGREL64LSB 0x5f
|
||||
#define R_IA64_SECREL32MSB 0x64
|
||||
#define R_IA64_SECREL32LSB 0x65
|
||||
#define R_IA64_SECREL64MSB 0x66
|
||||
#define R_IA64_SECREL64LSB 0x67
|
||||
#define R_IA64_REL32MSB 0x6c
|
||||
#define R_IA64_REL32LSB 0x6d
|
||||
#define R_IA64_REL64MSB 0x6e
|
||||
#define R_IA64_REL64LSB 0x6f
|
||||
#define R_IA64_LTV32MSB 0x74
|
||||
#define R_IA64_LTV32LSB 0x75
|
||||
#define R_IA64_LTV64MSB 0x76
|
||||
#define R_IA64_LTV64LSB 0x77
|
||||
#define R_IA64_PCREL21BI 0x79
|
||||
#define R_IA64_PCREL22 0x7a
|
||||
#define R_IA64_PCREL64I 0x7b
|
||||
#define R_IA64_IPLTMSB 0x80
|
||||
#define R_IA64_IPLTLSB 0x81
|
||||
#define R_IA64_COPY 0x84
|
||||
#define R_IA64_SUB 0x85
|
||||
#define R_IA64_LTOFF22X 0x86
|
||||
#define R_IA64_LDXMOV 0x87
|
||||
#define R_IA64_TPREL14 0x91
|
||||
#define R_IA64_TPREL22 0x92
|
||||
#define R_IA64_TPREL64I 0x93
|
||||
#define R_IA64_TPREL64MSB 0x96
|
||||
#define R_IA64_TPREL64LSB 0x97
|
||||
#define R_IA64_LTOFF_TPREL22 0x9a
|
||||
#define R_IA64_DTPMOD64MSB 0xa6
|
||||
#define R_IA64_DTPMOD64LSB 0xa7
|
||||
#define R_IA64_LTOFF_DTPMOD22 0xaa
|
||||
#define R_IA64_DTPREL14 0xb1
|
||||
#define R_IA64_DTPREL22 0xb2
|
||||
#define R_IA64_DTPREL64I 0xb3
|
||||
#define R_IA64_DTPREL32MSB 0xb4
|
||||
#define R_IA64_DTPREL32LSB 0xb5
|
||||
#define R_IA64_DTPREL64MSB 0xb6
|
||||
#define R_IA64_DTPREL64LSB 0xb7
|
||||
#define R_IA64_LTOFF_DTPREL22 0xba
|
||||
|
||||
|
||||
#define EF_SH_MACH_MASK 0x1f
|
||||
#define EF_SH_UNKNOWN 0x0
|
||||
#define EF_SH1 0x1
|
||||
#define EF_SH2 0x2
|
||||
#define EF_SH3 0x3
|
||||
#define EF_SH_DSP 0x4
|
||||
#define EF_SH3_DSP 0x5
|
||||
#define EF_SH4AL_DSP 0x6
|
||||
#define EF_SH3E 0x8
|
||||
#define EF_SH4 0x9
|
||||
#define EF_SH2E 0xb
|
||||
#define EF_SH4A 0xc
|
||||
#define EF_SH2A 0xd
|
||||
#define EF_SH4_NOFPU 0x10
|
||||
#define EF_SH4A_NOFPU 0x11
|
||||
#define EF_SH4_NOMMU_NOFPU 0x12
|
||||
#define EF_SH2A_NOFPU 0x13
|
||||
#define EF_SH3_NOMMU 0x14
|
||||
#define EF_SH2A_SH4_NOFPU 0x15
|
||||
#define EF_SH2A_SH3_NOFPU 0x16
|
||||
#define EF_SH2A_SH4 0x17
|
||||
#define EF_SH2A_SH3E 0x18
|
||||
|
||||
#define R_SH_NONE 0
|
||||
#define R_SH_DIR32 1
|
||||
#define R_SH_REL32 2
|
||||
#define R_SH_DIR8WPN 3
|
||||
#define R_SH_IND12W 4
|
||||
#define R_SH_DIR8WPL 5
|
||||
#define R_SH_DIR8WPZ 6
|
||||
#define R_SH_DIR8BP 7
|
||||
#define R_SH_DIR8W 8
|
||||
#define R_SH_DIR8L 9
|
||||
#define R_SH_SWITCH16 25
|
||||
#define R_SH_SWITCH32 26
|
||||
#define R_SH_USES 27
|
||||
#define R_SH_COUNT 28
|
||||
#define R_SH_ALIGN 29
|
||||
#define R_SH_CODE 30
|
||||
#define R_SH_DATA 31
|
||||
#define R_SH_LABEL 32
|
||||
#define R_SH_SWITCH8 33
|
||||
#define R_SH_GNU_VTINHERIT 34
|
||||
#define R_SH_GNU_VTENTRY 35
|
||||
#define R_SH_TLS_GD_32 144
|
||||
#define R_SH_TLS_LD_32 145
|
||||
#define R_SH_TLS_LDO_32 146
|
||||
#define R_SH_TLS_IE_32 147
|
||||
#define R_SH_TLS_LE_32 148
|
||||
#define R_SH_TLS_DTPMOD32 149
|
||||
#define R_SH_TLS_DTPOFF32 150
|
||||
#define R_SH_TLS_TPOFF32 151
|
||||
#define R_SH_GOT32 160
|
||||
#define R_SH_PLT32 161
|
||||
#define R_SH_COPY 162
|
||||
#define R_SH_GLOB_DAT 163
|
||||
#define R_SH_JMP_SLOT 164
|
||||
#define R_SH_RELATIVE 165
|
||||
#define R_SH_GOTOFF 166
|
||||
#define R_SH_GOTPC 167
|
||||
#define R_SH_GOT20 201
|
||||
#define R_SH_GOTOFF20 202
|
||||
#define R_SH_GOTFUNCDESC 203
|
||||
#define R_SH_GOTFUNCDEST20 204
|
||||
#define R_SH_GOTOFFFUNCDESC 205
|
||||
#define R_SH_GOTOFFFUNCDEST20 206
|
||||
#define R_SH_FUNCDESC 207
|
||||
#define R_SH_FUNCDESC_VALUE 208
|
||||
|
||||
#define R_SH_NUM 256
|
||||
|
||||
|
||||
|
||||
#define R_390_NONE 0
|
||||
#define R_390_8 1
|
||||
#define R_390_12 2
|
||||
#define R_390_16 3
|
||||
#define R_390_32 4
|
||||
#define R_390_PC32 5
|
||||
#define R_390_GOT12 6
|
||||
#define R_390_GOT32 7
|
||||
#define R_390_PLT32 8
|
||||
#define R_390_COPY 9
|
||||
#define R_390_GLOB_DAT 10
|
||||
#define R_390_JMP_SLOT 11
|
||||
#define R_390_RELATIVE 12
|
||||
#define R_390_GOTOFF32 13
|
||||
#define R_390_GOTPC 14
|
||||
#define R_390_GOT16 15
|
||||
#define R_390_PC16 16
|
||||
#define R_390_PC16DBL 17
|
||||
#define R_390_PLT16DBL 18
|
||||
#define R_390_PC32DBL 19
|
||||
#define R_390_PLT32DBL 20
|
||||
#define R_390_GOTPCDBL 21
|
||||
#define R_390_64 22
|
||||
#define R_390_PC64 23
|
||||
#define R_390_GOT64 24
|
||||
#define R_390_PLT64 25
|
||||
#define R_390_GOTENT 26
|
||||
#define R_390_GOTOFF16 27
|
||||
#define R_390_GOTOFF64 28
|
||||
#define R_390_GOTPLT12 29
|
||||
#define R_390_GOTPLT16 30
|
||||
#define R_390_GOTPLT32 31
|
||||
#define R_390_GOTPLT64 32
|
||||
#define R_390_GOTPLTENT 33
|
||||
#define R_390_PLTOFF16 34
|
||||
#define R_390_PLTOFF32 35
|
||||
#define R_390_PLTOFF64 36
|
||||
#define R_390_TLS_LOAD 37
|
||||
#define R_390_TLS_GDCALL 38
|
||||
|
||||
#define R_390_TLS_LDCALL 39
|
||||
|
||||
#define R_390_TLS_GD32 40
|
||||
|
||||
#define R_390_TLS_GD64 41
|
||||
|
||||
#define R_390_TLS_GOTIE12 42
|
||||
|
||||
#define R_390_TLS_GOTIE32 43
|
||||
|
||||
#define R_390_TLS_GOTIE64 44
|
||||
|
||||
#define R_390_TLS_LDM32 45
|
||||
|
||||
#define R_390_TLS_LDM64 46
|
||||
|
||||
#define R_390_TLS_IE32 47
|
||||
|
||||
#define R_390_TLS_IE64 48
|
||||
|
||||
#define R_390_TLS_IEENT 49
|
||||
|
||||
#define R_390_TLS_LE32 50
|
||||
|
||||
#define R_390_TLS_LE64 51
|
||||
|
||||
#define R_390_TLS_LDO32 52
|
||||
|
||||
#define R_390_TLS_LDO64 53
|
||||
|
||||
#define R_390_TLS_DTPMOD 54
|
||||
#define R_390_TLS_DTPOFF 55
|
||||
#define R_390_TLS_TPOFF 56
|
||||
|
||||
#define R_390_20 57
|
||||
#define R_390_GOT20 58
|
||||
#define R_390_GOTPLT20 59
|
||||
#define R_390_TLS_GOTIE20 60
|
||||
|
||||
|
||||
#define R_390_NUM 61
|
||||
|
||||
|
||||
|
||||
#define R_CRIS_NONE 0
|
||||
#define R_CRIS_8 1
|
||||
#define R_CRIS_16 2
|
||||
#define R_CRIS_32 3
|
||||
#define R_CRIS_8_PCREL 4
|
||||
#define R_CRIS_16_PCREL 5
|
||||
#define R_CRIS_32_PCREL 6
|
||||
#define R_CRIS_GNU_VTINHERIT 7
|
||||
#define R_CRIS_GNU_VTENTRY 8
|
||||
#define R_CRIS_COPY 9
|
||||
#define R_CRIS_GLOB_DAT 10
|
||||
#define R_CRIS_JUMP_SLOT 11
|
||||
#define R_CRIS_RELATIVE 12
|
||||
#define R_CRIS_16_GOT 13
|
||||
#define R_CRIS_32_GOT 14
|
||||
#define R_CRIS_16_GOTPLT 15
|
||||
#define R_CRIS_32_GOTPLT 16
|
||||
#define R_CRIS_32_GOTREL 17
|
||||
#define R_CRIS_32_PLT_GOTREL 18
|
||||
#define R_CRIS_32_PLT_PCREL 19
|
||||
|
||||
#define R_CRIS_NUM 20
|
||||
|
||||
|
||||
|
||||
#define R_X86_64_NONE 0
|
||||
#define R_X86_64_64 1
|
||||
#define R_X86_64_PC32 2
|
||||
#define R_X86_64_GOT32 3
|
||||
#define R_X86_64_PLT32 4
|
||||
#define R_X86_64_COPY 5
|
||||
#define R_X86_64_GLOB_DAT 6
|
||||
#define R_X86_64_JUMP_SLOT 7
|
||||
#define R_X86_64_RELATIVE 8
|
||||
#define R_X86_64_GOTPCREL 9
|
||||
|
||||
#define R_X86_64_32 10
|
||||
#define R_X86_64_32S 11
|
||||
#define R_X86_64_16 12
|
||||
#define R_X86_64_PC16 13
|
||||
#define R_X86_64_8 14
|
||||
#define R_X86_64_PC8 15
|
||||
#define R_X86_64_DTPMOD64 16
|
||||
#define R_X86_64_DTPOFF64 17
|
||||
#define R_X86_64_TPOFF64 18
|
||||
#define R_X86_64_TLSGD 19
|
||||
|
||||
#define R_X86_64_TLSLD 20
|
||||
|
||||
#define R_X86_64_DTPOFF32 21
|
||||
#define R_X86_64_GOTTPOFF 22
|
||||
|
||||
#define R_X86_64_TPOFF32 23
|
||||
#define R_X86_64_PC64 24
|
||||
#define R_X86_64_GOTOFF64 25
|
||||
#define R_X86_64_GOTPC32 26
|
||||
#define R_X86_64_GOT64 27
|
||||
#define R_X86_64_GOTPCREL64 28
|
||||
#define R_X86_64_GOTPC64 29
|
||||
#define R_X86_64_GOTPLT64 30
|
||||
#define R_X86_64_PLTOFF64 31
|
||||
#define R_X86_64_SIZE32 32
|
||||
#define R_X86_64_SIZE64 33
|
||||
|
||||
#define R_X86_64_GOTPC32_TLSDESC 34
|
||||
#define R_X86_64_TLSDESC_CALL 35
|
||||
|
||||
#define R_X86_64_TLSDESC 36
|
||||
#define R_X86_64_IRELATIVE 37
|
||||
#define R_X86_64_RELATIVE64 38
|
||||
#define R_X86_64_GOTPCRELX 41
|
||||
#define R_X86_64_REX_GOTPCRELX 42
|
||||
#define R_X86_64_NUM 43
|
||||
|
||||
|
||||
|
||||
#define R_MN10300_NONE 0
|
||||
#define R_MN10300_32 1
|
||||
#define R_MN10300_16 2
|
||||
#define R_MN10300_8 3
|
||||
#define R_MN10300_PCREL32 4
|
||||
#define R_MN10300_PCREL16 5
|
||||
#define R_MN10300_PCREL8 6
|
||||
#define R_MN10300_GNU_VTINHERIT 7
|
||||
#define R_MN10300_GNU_VTENTRY 8
|
||||
#define R_MN10300_24 9
|
||||
#define R_MN10300_GOTPC32 10
|
||||
#define R_MN10300_GOTPC16 11
|
||||
#define R_MN10300_GOTOFF32 12
|
||||
#define R_MN10300_GOTOFF24 13
|
||||
#define R_MN10300_GOTOFF16 14
|
||||
#define R_MN10300_PLT32 15
|
||||
#define R_MN10300_PLT16 16
|
||||
#define R_MN10300_GOT32 17
|
||||
#define R_MN10300_GOT24 18
|
||||
#define R_MN10300_GOT16 19
|
||||
#define R_MN10300_COPY 20
|
||||
#define R_MN10300_GLOB_DAT 21
|
||||
#define R_MN10300_JMP_SLOT 22
|
||||
#define R_MN10300_RELATIVE 23
|
||||
|
||||
#define R_MN10300_NUM 24
|
||||
|
||||
|
||||
|
||||
#define R_M32R_NONE 0
|
||||
#define R_M32R_16 1
|
||||
#define R_M32R_32 2
|
||||
#define R_M32R_24 3
|
||||
#define R_M32R_10_PCREL 4
|
||||
#define R_M32R_18_PCREL 5
|
||||
#define R_M32R_26_PCREL 6
|
||||
#define R_M32R_HI16_ULO 7
|
||||
#define R_M32R_HI16_SLO 8
|
||||
#define R_M32R_LO16 9
|
||||
#define R_M32R_SDA16 10
|
||||
#define R_M32R_GNU_VTINHERIT 11
|
||||
#define R_M32R_GNU_VTENTRY 12
|
||||
|
||||
#define R_M32R_16_RELA 33
|
||||
#define R_M32R_32_RELA 34
|
||||
#define R_M32R_24_RELA 35
|
||||
#define R_M32R_10_PCREL_RELA 36
|
||||
#define R_M32R_18_PCREL_RELA 37
|
||||
#define R_M32R_26_PCREL_RELA 38
|
||||
#define R_M32R_HI16_ULO_RELA 39
|
||||
#define R_M32R_HI16_SLO_RELA 40
|
||||
#define R_M32R_LO16_RELA 41
|
||||
#define R_M32R_SDA16_RELA 42
|
||||
#define R_M32R_RELA_GNU_VTINHERIT 43
|
||||
#define R_M32R_RELA_GNU_VTENTRY 44
|
||||
#define R_M32R_REL32 45
|
||||
|
||||
#define R_M32R_GOT24 48
|
||||
#define R_M32R_26_PLTREL 49
|
||||
#define R_M32R_COPY 50
|
||||
#define R_M32R_GLOB_DAT 51
|
||||
#define R_M32R_JMP_SLOT 52
|
||||
#define R_M32R_RELATIVE 53
|
||||
#define R_M32R_GOTOFF 54
|
||||
#define R_M32R_GOTPC24 55
|
||||
#define R_M32R_GOT16_HI_ULO 56
|
||||
|
||||
#define R_M32R_GOT16_HI_SLO 57
|
||||
|
||||
#define R_M32R_GOT16_LO 58
|
||||
#define R_M32R_GOTPC_HI_ULO 59
|
||||
|
||||
#define R_M32R_GOTPC_HI_SLO 60
|
||||
|
||||
#define R_M32R_GOTPC_LO 61
|
||||
|
||||
#define R_M32R_GOTOFF_HI_ULO 62
|
||||
|
||||
#define R_M32R_GOTOFF_HI_SLO 63
|
||||
|
||||
#define R_M32R_GOTOFF_LO 64
|
||||
#define R_M32R_NUM 256
|
||||
|
||||
#define R_MICROBLAZE_NONE 0
|
||||
#define R_MICROBLAZE_32 1
|
||||
#define R_MICROBLAZE_32_PCREL 2
|
||||
#define R_MICROBLAZE_64_PCREL 3
|
||||
#define R_MICROBLAZE_32_PCREL_LO 4
|
||||
#define R_MICROBLAZE_64 5
|
||||
#define R_MICROBLAZE_32_LO 6
|
||||
#define R_MICROBLAZE_SRO32 7
|
||||
#define R_MICROBLAZE_SRW32 8
|
||||
#define R_MICROBLAZE_64_NONE 9
|
||||
#define R_MICROBLAZE_32_SYM_OP_SYM 10
|
||||
#define R_MICROBLAZE_GNU_VTINHERIT 11
|
||||
#define R_MICROBLAZE_GNU_VTENTRY 12
|
||||
#define R_MICROBLAZE_GOTPC_64 13
|
||||
#define R_MICROBLAZE_GOT_64 14
|
||||
#define R_MICROBLAZE_PLT_64 15
|
||||
#define R_MICROBLAZE_REL 16
|
||||
#define R_MICROBLAZE_JUMP_SLOT 17
|
||||
#define R_MICROBLAZE_GLOB_DAT 18
|
||||
#define R_MICROBLAZE_GOTOFF_64 19
|
||||
#define R_MICROBLAZE_GOTOFF_32 20
|
||||
#define R_MICROBLAZE_COPY 21
|
||||
#define R_MICROBLAZE_TLS 22
|
||||
#define R_MICROBLAZE_TLSGD 23
|
||||
#define R_MICROBLAZE_TLSLD 24
|
||||
#define R_MICROBLAZE_TLSDTPMOD32 25
|
||||
#define R_MICROBLAZE_TLSDTPREL32 26
|
||||
#define R_MICROBLAZE_TLSDTPREL64 27
|
||||
#define R_MICROBLAZE_TLSGOTTPREL32 28
|
||||
#define R_MICROBLAZE_TLSTPREL32 29
|
||||
|
||||
#define DT_NIOS2_GP 0x70000002
|
||||
|
||||
#define R_NIOS2_NONE 0
|
||||
#define R_NIOS2_S16 1
|
||||
#define R_NIOS2_U16 2
|
||||
#define R_NIOS2_PCREL16 3
|
||||
#define R_NIOS2_CALL26 4
|
||||
#define R_NIOS2_IMM5 5
|
||||
#define R_NIOS2_CACHE_OPX 6
|
||||
#define R_NIOS2_IMM6 7
|
||||
#define R_NIOS2_IMM8 8
|
||||
#define R_NIOS2_HI16 9
|
||||
#define R_NIOS2_LO16 10
|
||||
#define R_NIOS2_HIADJ16 11
|
||||
#define R_NIOS2_BFD_RELOC_32 12
|
||||
#define R_NIOS2_BFD_RELOC_16 13
|
||||
#define R_NIOS2_BFD_RELOC_8 14
|
||||
#define R_NIOS2_GPREL 15
|
||||
#define R_NIOS2_GNU_VTINHERIT 16
|
||||
#define R_NIOS2_GNU_VTENTRY 17
|
||||
#define R_NIOS2_UJMP 18
|
||||
#define R_NIOS2_CJMP 19
|
||||
#define R_NIOS2_CALLR 20
|
||||
#define R_NIOS2_ALIGN 21
|
||||
#define R_NIOS2_GOT16 22
|
||||
#define R_NIOS2_CALL16 23
|
||||
#define R_NIOS2_GOTOFF_LO 24
|
||||
#define R_NIOS2_GOTOFF_HA 25
|
||||
#define R_NIOS2_PCREL_LO 26
|
||||
#define R_NIOS2_PCREL_HA 27
|
||||
#define R_NIOS2_TLS_GD16 28
|
||||
#define R_NIOS2_TLS_LDM16 29
|
||||
#define R_NIOS2_TLS_LDO16 30
|
||||
#define R_NIOS2_TLS_IE16 31
|
||||
#define R_NIOS2_TLS_LE16 32
|
||||
#define R_NIOS2_TLS_DTPMOD 33
|
||||
#define R_NIOS2_TLS_DTPREL 34
|
||||
#define R_NIOS2_TLS_TPREL 35
|
||||
#define R_NIOS2_COPY 36
|
||||
#define R_NIOS2_GLOB_DAT 37
|
||||
#define R_NIOS2_JUMP_SLOT 38
|
||||
#define R_NIOS2_RELATIVE 39
|
||||
#define R_NIOS2_GOTOFF 40
|
||||
#define R_NIOS2_CALL26_NOAT 41
|
||||
#define R_NIOS2_GOT_LO 42
|
||||
#define R_NIOS2_GOT_HA 43
|
||||
#define R_NIOS2_CALL_LO 44
|
||||
#define R_NIOS2_CALL_HA 45
|
||||
|
||||
#define R_OR1K_NONE 0
|
||||
#define R_OR1K_32 1
|
||||
#define R_OR1K_16 2
|
||||
#define R_OR1K_8 3
|
||||
#define R_OR1K_LO_16_IN_INSN 4
|
||||
#define R_OR1K_HI_16_IN_INSN 5
|
||||
#define R_OR1K_INSN_REL_26 6
|
||||
#define R_OR1K_GNU_VTENTRY 7
|
||||
#define R_OR1K_GNU_VTINHERIT 8
|
||||
#define R_OR1K_32_PCREL 9
|
||||
#define R_OR1K_16_PCREL 10
|
||||
#define R_OR1K_8_PCREL 11
|
||||
#define R_OR1K_GOTPC_HI16 12
|
||||
#define R_OR1K_GOTPC_LO16 13
|
||||
#define R_OR1K_GOT16 14
|
||||
#define R_OR1K_PLT26 15
|
||||
#define R_OR1K_GOTOFF_HI16 16
|
||||
#define R_OR1K_GOTOFF_LO16 17
|
||||
#define R_OR1K_COPY 18
|
||||
#define R_OR1K_GLOB_DAT 19
|
||||
#define R_OR1K_JMP_SLOT 20
|
||||
#define R_OR1K_RELATIVE 21
|
||||
#define R_OR1K_TLS_GD_HI16 22
|
||||
#define R_OR1K_TLS_GD_LO16 23
|
||||
#define R_OR1K_TLS_LDM_HI16 24
|
||||
#define R_OR1K_TLS_LDM_LO16 25
|
||||
#define R_OR1K_TLS_LDO_HI16 26
|
||||
#define R_OR1K_TLS_LDO_LO16 27
|
||||
#define R_OR1K_TLS_IE_HI16 28
|
||||
#define R_OR1K_TLS_IE_LO16 29
|
||||
#define R_OR1K_TLS_LE_HI16 30
|
||||
#define R_OR1K_TLS_LE_LO16 31
|
||||
#define R_OR1K_TLS_TPOFF 32
|
||||
#define R_OR1K_TLS_DTPOFF 33
|
||||
#define R_OR1K_TLS_DTPMOD 34
|
||||
|
||||
#define R_BPF_NONE 0
|
||||
#define R_BPF_MAP_FD 1
|
||||
|
||||
#define R_RISCV_NONE 0
|
||||
#define R_RISCV_32 1
|
||||
#define R_RISCV_64 2
|
||||
#define R_RISCV_RELATIVE 3
|
||||
#define R_RISCV_COPY 4
|
||||
#define R_RISCV_JUMP_SLOT 5
|
||||
#define R_RISCV_TLS_DTPMOD32 6
|
||||
#define R_RISCV_TLS_DTPMOD64 7
|
||||
#define R_RISCV_TLS_DTPREL32 8
|
||||
#define R_RISCV_TLS_DTPREL64 9
|
||||
#define R_RISCV_TLS_TPREL32 10
|
||||
#define R_RISCV_TLS_TPREL64 11
|
||||
|
||||
#define R_RISCV_BRANCH 16
|
||||
#define R_RISCV_JAL 17
|
||||
#define R_RISCV_CALL 18
|
||||
#define R_RISCV_CALL_PLT 19
|
||||
#define R_RISCV_GOT_HI20 20
|
||||
#define R_RISCV_TLS_GOT_HI20 21
|
||||
#define R_RISCV_TLS_GD_HI20 22
|
||||
#define R_RISCV_PCREL_HI20 23
|
||||
#define R_RISCV_PCREL_LO12_I 24
|
||||
#define R_RISCV_PCREL_LO12_S 25
|
||||
#define R_RISCV_HI20 26
|
||||
#define R_RISCV_LO12_I 27
|
||||
#define R_RISCV_LO12_S 28
|
||||
#define R_RISCV_TPREL_HI20 29
|
||||
#define R_RISCV_TPREL_LO12_I 30
|
||||
#define R_RISCV_TPREL_LO12_S 31
|
||||
#define R_RISCV_TPREL_ADD 32
|
||||
#define R_RISCV_ADD8 33
|
||||
#define R_RISCV_ADD16 34
|
||||
#define R_RISCV_ADD32 35
|
||||
#define R_RISCV_ADD64 36
|
||||
#define R_RISCV_SUB8 37
|
||||
#define R_RISCV_SUB16 38
|
||||
#define R_RISCV_SUB32 39
|
||||
#define R_RISCV_SUB64 40
|
||||
#define R_RISCV_GNU_VTINHERIT 41
|
||||
#define R_RISCV_GNU_VTENTRY 42
|
||||
#define R_RISCV_ALIGN 43
|
||||
#define R_RISCV_RVC_BRANCH 44
|
||||
#define R_RISCV_RVC_JUMP 45
|
||||
#define R_RISCV_RVC_LUI 46
|
||||
#define R_RISCV_GPREL_I 47
|
||||
#define R_RISCV_GPREL_S 48
|
||||
#define R_RISCV_TPREL_I 49
|
||||
#define R_RISCV_TPREL_S 50
|
||||
#define R_RISCV_RELAX 51
|
||||
#define R_RISCV_SUB6 52
|
||||
#define R_RISCV_SET6 53
|
||||
#define R_RISCV_SET8 54
|
||||
#define R_RISCV_SET16 55
|
||||
#define R_RISCV_SET32 56
|
||||
#define R_RISCV_32_PCREL 57
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,82 @@
|
||||
#ifndef _ENDIAN_H
|
||||
#define _ENDIAN_H
|
||||
|
||||
#include <features.h>
|
||||
|
||||
#define __LITTLE_ENDIAN 1234
|
||||
#define __BIG_ENDIAN 4321
|
||||
#define __PDP_ENDIAN 3412
|
||||
|
||||
#if defined(__GNUC__) && defined(__BYTE_ORDER__)
|
||||
#define __BYTE_ORDER __BYTE_ORDER__
|
||||
#else
|
||||
#include <bits/endian.h>
|
||||
#endif
|
||||
|
||||
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
||||
|
||||
#define BIG_ENDIAN __BIG_ENDIAN
|
||||
#define LITTLE_ENDIAN __LITTLE_ENDIAN
|
||||
#define PDP_ENDIAN __PDP_ENDIAN
|
||||
#define BYTE_ORDER __BYTE_ORDER
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
static __inline uint16_t __bswap16(uint16_t __x)
|
||||
{
|
||||
return __x<<8 | __x>>8;
|
||||
}
|
||||
|
||||
static __inline uint32_t __bswap32(uint32_t __x)
|
||||
{
|
||||
return __x>>24 | __x>>8&0xff00 | __x<<8&0xff0000 | __x<<24;
|
||||
}
|
||||
|
||||
static __inline uint64_t __bswap64(uint64_t __x)
|
||||
{
|
||||
return __bswap32(__x)+0ULL<<32 | __bswap32(__x>>32);
|
||||
}
|
||||
|
||||
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
#define htobe16(x) __bswap16(x)
|
||||
#define be16toh(x) __bswap16(x)
|
||||
#define betoh16(x) __bswap16(x)
|
||||
#define htobe32(x) __bswap32(x)
|
||||
#define be32toh(x) __bswap32(x)
|
||||
#define betoh32(x) __bswap32(x)
|
||||
#define htobe64(x) __bswap64(x)
|
||||
#define be64toh(x) __bswap64(x)
|
||||
#define betoh64(x) __bswap64(x)
|
||||
#define htole16(x) (uint16_t)(x)
|
||||
#define le16toh(x) (uint16_t)(x)
|
||||
#define letoh16(x) (uint16_t)(x)
|
||||
#define htole32(x) (uint32_t)(x)
|
||||
#define le32toh(x) (uint32_t)(x)
|
||||
#define letoh32(x) (uint32_t)(x)
|
||||
#define htole64(x) (uint64_t)(x)
|
||||
#define le64toh(x) (uint64_t)(x)
|
||||
#define letoh64(x) (uint64_t)(x)
|
||||
#else
|
||||
#define htobe16(x) (uint16_t)(x)
|
||||
#define be16toh(x) (uint16_t)(x)
|
||||
#define betoh16(x) (uint16_t)(x)
|
||||
#define htobe32(x) (uint32_t)(x)
|
||||
#define be32toh(x) (uint32_t)(x)
|
||||
#define betoh32(x) (uint32_t)(x)
|
||||
#define htobe64(x) (uint64_t)(x)
|
||||
#define be64toh(x) (uint64_t)(x)
|
||||
#define betoh64(x) (uint64_t)(x)
|
||||
#define htole16(x) __bswap16(x)
|
||||
#define le16toh(x) __bswap16(x)
|
||||
#define letoh16(x) __bswap16(x)
|
||||
#define htole32(x) __bswap32(x)
|
||||
#define le32toh(x) __bswap32(x)
|
||||
#define letoh32(x) __bswap32(x)
|
||||
#define htole64(x) __bswap64(x)
|
||||
#define le64toh(x) __bswap64(x)
|
||||
#define letoh64(x) __bswap64(x)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,25 @@
|
||||
#ifndef _ERR_H
|
||||
#define _ERR_H
|
||||
|
||||
#include <features.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void warn(const char *, ...);
|
||||
void vwarn(const char *, va_list);
|
||||
void warnx(const char *, ...);
|
||||
void vwarnx(const char *, va_list);
|
||||
|
||||
_Noreturn void err(int, const char *, ...);
|
||||
_Noreturn void verr(int, const char *, va_list);
|
||||
_Noreturn void errx(int, const char *, ...);
|
||||
_Noreturn void verrx(int, const char *, va_list);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,27 @@
|
||||
#ifndef _ERRNO_H
|
||||
#define _ERRNO_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <features.h>
|
||||
|
||||
#include <bits/errno.h>
|
||||
|
||||
#ifdef __GNUC__
|
||||
__attribute__((const))
|
||||
#endif
|
||||
int *__errno_location(void);
|
||||
#define errno (*__errno_location())
|
||||
|
||||
#ifdef _GNU_SOURCE
|
||||
extern char *program_invocation_short_name, *program_invocation_name;
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,211 @@
|
||||
#ifndef _FCNTL_H
|
||||
#define _FCNTL_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <features.h>
|
||||
|
||||
#define __NEED_off_t
|
||||
#define __NEED_pid_t
|
||||
#define __NEED_mode_t
|
||||
|
||||
#ifdef _GNU_SOURCE
|
||||
#define __NEED_size_t
|
||||
#define __NEED_ssize_t
|
||||
#define __NEED_struct_iovec
|
||||
#endif
|
||||
|
||||
#include <bits/alltypes.h>
|
||||
|
||||
#include <bits/fcntl.h>
|
||||
|
||||
struct flock {
|
||||
short l_type;
|
||||
short l_whence;
|
||||
off_t l_start;
|
||||
off_t l_len;
|
||||
pid_t l_pid;
|
||||
};
|
||||
|
||||
int creat(const char *, mode_t);
|
||||
int fcntl(int, int, ...);
|
||||
int open(const char *, int, ...);
|
||||
int openat(int, const char *, int, ...);
|
||||
int posix_fadvise(int, off_t, off_t, int);
|
||||
int posix_fallocate(int, off_t, off_t);
|
||||
|
||||
#define O_SEARCH O_PATH
|
||||
#define O_EXEC O_PATH
|
||||
#define O_TTY_INIT 0
|
||||
|
||||
#define O_ACCMODE (03|O_SEARCH)
|
||||
#define O_RDONLY 00
|
||||
#define O_WRONLY 01
|
||||
#define O_RDWR 02
|
||||
|
||||
#define F_OFD_GETLK 36
|
||||
#define F_OFD_SETLK 37
|
||||
#define F_OFD_SETLKW 38
|
||||
|
||||
#define F_DUPFD_CLOEXEC 1030
|
||||
|
||||
#define F_RDLCK 0
|
||||
#define F_WRLCK 1
|
||||
#define F_UNLCK 2
|
||||
|
||||
#define FD_CLOEXEC 1
|
||||
|
||||
#define AT_FDCWD (-100)
|
||||
#define AT_SYMLINK_NOFOLLOW 0x100
|
||||
#define AT_REMOVEDIR 0x200
|
||||
#define AT_SYMLINK_FOLLOW 0x400
|
||||
#define AT_EACCESS 0x200
|
||||
|
||||
#define POSIX_FADV_NORMAL 0
|
||||
#define POSIX_FADV_RANDOM 1
|
||||
#define POSIX_FADV_SEQUENTIAL 2
|
||||
#define POSIX_FADV_WILLNEED 3
|
||||
#ifndef POSIX_FADV_DONTNEED
|
||||
#define POSIX_FADV_DONTNEED 4
|
||||
#define POSIX_FADV_NOREUSE 5
|
||||
#endif
|
||||
|
||||
#undef SEEK_SET
|
||||
#undef SEEK_CUR
|
||||
#undef SEEK_END
|
||||
#define SEEK_SET 0
|
||||
#define SEEK_CUR 1
|
||||
#define SEEK_END 2
|
||||
|
||||
#ifndef S_IRUSR
|
||||
#define S_ISUID 04000
|
||||
#define S_ISGID 02000
|
||||
#define S_ISVTX 01000
|
||||
#define S_IRUSR 0400
|
||||
#define S_IWUSR 0200
|
||||
#define S_IXUSR 0100
|
||||
#define S_IRWXU 0700
|
||||
#define S_IRGRP 0040
|
||||
#define S_IWGRP 0020
|
||||
#define S_IXGRP 0010
|
||||
#define S_IRWXG 0070
|
||||
#define S_IROTH 0004
|
||||
#define S_IWOTH 0002
|
||||
#define S_IXOTH 0001
|
||||
#define S_IRWXO 0007
|
||||
#endif
|
||||
|
||||
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
||||
#define AT_NO_AUTOMOUNT 0x800
|
||||
#define AT_EMPTY_PATH 0x1000
|
||||
|
||||
#define FAPPEND O_APPEND
|
||||
#define FFSYNC O_SYNC
|
||||
#define FASYNC O_ASYNC
|
||||
#define FNONBLOCK O_NONBLOCK
|
||||
#define FNDELAY O_NDELAY
|
||||
|
||||
#define F_OK 0
|
||||
#define R_OK 4
|
||||
#define W_OK 2
|
||||
#define X_OK 1
|
||||
#define F_ULOCK 0
|
||||
#define F_LOCK 1
|
||||
#define F_TLOCK 2
|
||||
#define F_TEST 3
|
||||
|
||||
#define F_SETLEASE 1024
|
||||
#define F_GETLEASE 1025
|
||||
#define F_NOTIFY 1026
|
||||
#define F_CANCELLK 1029
|
||||
#define F_SETPIPE_SZ 1031
|
||||
#define F_GETPIPE_SZ 1032
|
||||
#define F_ADD_SEALS 1033
|
||||
#define F_GET_SEALS 1034
|
||||
|
||||
#define F_SEAL_SEAL 0x0001
|
||||
#define F_SEAL_SHRINK 0x0002
|
||||
#define F_SEAL_GROW 0x0004
|
||||
#define F_SEAL_WRITE 0x0008
|
||||
#define F_SEAL_FUTURE_WRITE 0x0010
|
||||
|
||||
#define F_GET_RW_HINT 1035
|
||||
#define F_SET_RW_HINT 1036
|
||||
#define F_GET_FILE_RW_HINT 1037
|
||||
#define F_SET_FILE_RW_HINT 1038
|
||||
|
||||
#define RWF_WRITE_LIFE_NOT_SET 0
|
||||
#define RWH_WRITE_LIFE_NONE 1
|
||||
#define RWH_WRITE_LIFE_SHORT 2
|
||||
#define RWH_WRITE_LIFE_MEDIUM 3
|
||||
#define RWH_WRITE_LIFE_LONG 4
|
||||
#define RWH_WRITE_LIFE_EXTREME 5
|
||||
|
||||
#define DN_ACCESS 0x00000001
|
||||
#define DN_MODIFY 0x00000002
|
||||
#define DN_CREATE 0x00000004
|
||||
#define DN_DELETE 0x00000008
|
||||
#define DN_RENAME 0x00000010
|
||||
#define DN_ATTRIB 0x00000020
|
||||
#define DN_MULTISHOT 0x80000000
|
||||
|
||||
int lockf(int, int, off_t);
|
||||
#endif
|
||||
|
||||
#if defined(_GNU_SOURCE)
|
||||
#define F_OWNER_TID 0
|
||||
#define F_OWNER_PID 1
|
||||
#define F_OWNER_PGRP 2
|
||||
#define F_OWNER_GID 2
|
||||
struct file_handle {
|
||||
unsigned handle_bytes;
|
||||
int handle_type;
|
||||
unsigned char f_handle[];
|
||||
};
|
||||
struct f_owner_ex {
|
||||
int type;
|
||||
pid_t pid;
|
||||
};
|
||||
#define FALLOC_FL_KEEP_SIZE 1
|
||||
#define FALLOC_FL_PUNCH_HOLE 2
|
||||
#define MAX_HANDLE_SZ 128
|
||||
#define SYNC_FILE_RANGE_WAIT_BEFORE 1
|
||||
#define SYNC_FILE_RANGE_WRITE 2
|
||||
#define SYNC_FILE_RANGE_WAIT_AFTER 4
|
||||
#define SPLICE_F_MOVE 1
|
||||
#define SPLICE_F_NONBLOCK 2
|
||||
#define SPLICE_F_MORE 4
|
||||
#define SPLICE_F_GIFT 8
|
||||
int fallocate(int, int, off_t, off_t);
|
||||
#define fallocate64 fallocate
|
||||
int name_to_handle_at(int, const char *, struct file_handle *, int *, int);
|
||||
int open_by_handle_at(int, struct file_handle *, int);
|
||||
ssize_t readahead(int, off_t, size_t);
|
||||
int sync_file_range(int, off_t, off_t, unsigned);
|
||||
ssize_t vmsplice(int, const struct iovec *, size_t, unsigned);
|
||||
ssize_t splice(int, off_t *, int, off_t *, size_t, unsigned);
|
||||
ssize_t tee(int, int, size_t, unsigned);
|
||||
#define loff_t off_t
|
||||
#endif
|
||||
|
||||
#if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
|
||||
#define F_GETLK64 F_GETLK
|
||||
#define F_SETLK64 F_SETLK
|
||||
#define F_SETLKW64 F_SETLKW
|
||||
#define flock64 flock
|
||||
#define open64 open
|
||||
#define openat64 openat
|
||||
#define creat64 creat
|
||||
#define lockf64 lockf
|
||||
#define posix_fadvise64 posix_fadvise
|
||||
#define posix_fallocate64 posix_fallocate
|
||||
#define off64_t off_t
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,38 @@
|
||||
#ifndef _FEATURES_H
|
||||
#define _FEATURES_H
|
||||
|
||||
#if defined(_ALL_SOURCE) && !defined(_GNU_SOURCE)
|
||||
#define _GNU_SOURCE 1
|
||||
#endif
|
||||
|
||||
#if defined(_DEFAULT_SOURCE) && !defined(_BSD_SOURCE)
|
||||
#define _BSD_SOURCE 1
|
||||
#endif
|
||||
|
||||
#if !defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) \
|
||||
&& !defined(_XOPEN_SOURCE) && !defined(_GNU_SOURCE) \
|
||||
&& !defined(_BSD_SOURCE) && !defined(__STRICT_ANSI__)
|
||||
#define _BSD_SOURCE 1
|
||||
#define _XOPEN_SOURCE 700
|
||||
#endif
|
||||
|
||||
#if __STDC_VERSION__ >= 199901L
|
||||
#define __restrict restrict
|
||||
#elif !defined(__GNUC__)
|
||||
#define __restrict
|
||||
#endif
|
||||
|
||||
#if __STDC_VERSION__ >= 199901L || defined(__cplusplus)
|
||||
#define __inline inline
|
||||
#elif !defined(__GNUC__)
|
||||
#define __inline
|
||||
#endif
|
||||
|
||||
#if __STDC_VERSION__ >= 201112L
|
||||
#elif defined(__GNUC__)
|
||||
#define _Noreturn __attribute__((__noreturn__))
|
||||
#else
|
||||
#define _Noreturn
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,28 @@
|
||||
#ifndef _FENV_H
|
||||
#define _FENV_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <bits/fenv.h>
|
||||
|
||||
int feclearexcept(int);
|
||||
int fegetexceptflag(fexcept_t *, int);
|
||||
int feraiseexcept(int);
|
||||
int fesetexceptflag(const fexcept_t *, int);
|
||||
int fetestexcept(int);
|
||||
|
||||
int fegetround(void);
|
||||
int fesetround(int);
|
||||
|
||||
int fegetenv(fenv_t *);
|
||||
int feholdexcept(fenv_t *);
|
||||
int fesetenv(const fenv_t *);
|
||||
int feupdateenv(const fenv_t *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
#ifndef _FLOAT_H
|
||||
#define _FLOAT_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int __flt_rounds(void);
|
||||
#define FLT_ROUNDS (__flt_rounds())
|
||||
|
||||
#define FLT_RADIX 2
|
||||
|
||||
#define FLT_TRUE_MIN 1.40129846432481707092e-45F
|
||||
#define FLT_MIN 1.17549435082228750797e-38F
|
||||
#define FLT_MAX 3.40282346638528859812e+38F
|
||||
#define FLT_EPSILON 1.1920928955078125e-07F
|
||||
|
||||
#define FLT_MANT_DIG 24
|
||||
#define FLT_MIN_EXP (-125)
|
||||
#define FLT_MAX_EXP 128
|
||||
#define FLT_HAS_SUBNORM 1
|
||||
|
||||
#define FLT_DIG 6
|
||||
#define FLT_DECIMAL_DIG 9
|
||||
#define FLT_MIN_10_EXP (-37)
|
||||
#define FLT_MAX_10_EXP 38
|
||||
|
||||
#define DBL_TRUE_MIN 4.94065645841246544177e-324
|
||||
#define DBL_MIN 2.22507385850720138309e-308
|
||||
#define DBL_MAX 1.79769313486231570815e+308
|
||||
#define DBL_EPSILON 2.22044604925031308085e-16
|
||||
|
||||
#define DBL_MANT_DIG 53
|
||||
#define DBL_MIN_EXP (-1021)
|
||||
#define DBL_MAX_EXP 1024
|
||||
#define DBL_HAS_SUBNORM 1
|
||||
|
||||
#define DBL_DIG 15
|
||||
#define DBL_DECIMAL_DIG 17
|
||||
#define DBL_MIN_10_EXP (-307)
|
||||
#define DBL_MAX_10_EXP 308
|
||||
|
||||
#define LDBL_HAS_SUBNORM 1
|
||||
#define LDBL_DECIMAL_DIG DECIMAL_DIG
|
||||
|
||||
#include <bits/float.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,47 @@
|
||||
#ifndef _FMTMSG_H
|
||||
#define _FMTMSG_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define MM_HARD 1
|
||||
#define MM_SOFT 2
|
||||
#define MM_FIRM 4
|
||||
|
||||
#define MM_APPL 8
|
||||
#define MM_UTIL 16
|
||||
#define MM_OPSYS 32
|
||||
|
||||
#define MM_RECOVER 64
|
||||
#define MM_NRECOV 128
|
||||
|
||||
#define MM_PRINT 256
|
||||
#define MM_CONSOLE 512
|
||||
|
||||
#define MM_NULLMC 0L
|
||||
|
||||
#define MM_HALT 1
|
||||
#define MM_ERROR 2
|
||||
#define MM_WARNING 3
|
||||
#define MM_INFO 4
|
||||
#define MM_NOSEV 0
|
||||
|
||||
#define MM_OK 0
|
||||
#define MM_NOTOK (-1)
|
||||
#define MM_NOMSG 1
|
||||
#define MM_NOCON 4
|
||||
|
||||
#define MM_NULLLBL ((char*)0)
|
||||
#define MM_NULLTXT ((char*)0)
|
||||
#define MM_NULLACT ((char*)0)
|
||||
#define MM_NULLTAG ((char*)0)
|
||||
#define MM_NULLSEV 0
|
||||
|
||||
int fmtmsg(long, const char *, int, const char *, const char *, const char *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,24 @@
|
||||
#ifndef _FNMATCH_H
|
||||
#define _FNMATCH_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define FNM_PATHNAME 0x1
|
||||
#define FNM_NOESCAPE 0x2
|
||||
#define FNM_PERIOD 0x4
|
||||
#define FNM_LEADING_DIR 0x8
|
||||
#define FNM_CASEFOLD 0x10
|
||||
#define FNM_FILE_NAME FNM_PATHNAME
|
||||
|
||||
#define FNM_NOMATCH 1
|
||||
#define FNM_NOSYS (-1)
|
||||
|
||||
int fnmatch(const char *, const char *, int);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,41 @@
|
||||
#ifndef _FTW_H
|
||||
#define _FTW_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <features.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#define FTW_F 1
|
||||
#define FTW_D 2
|
||||
#define FTW_DNR 3
|
||||
#define FTW_NS 4
|
||||
#define FTW_SL 5
|
||||
#define FTW_DP 6
|
||||
#define FTW_SLN 7
|
||||
|
||||
#define FTW_PHYS 1
|
||||
#define FTW_MOUNT 2
|
||||
#define FTW_CHDIR 4
|
||||
#define FTW_DEPTH 8
|
||||
|
||||
struct FTW {
|
||||
int base;
|
||||
int level;
|
||||
};
|
||||
|
||||
int ftw(const char *, int (*)(const char *, const struct stat *, int), int);
|
||||
int nftw(const char *, int (*)(const char *, const struct stat *, int, struct FTW *), int, int);
|
||||
|
||||
#if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
|
||||
#define ftw64 ftw
|
||||
#define nftw64 nftw
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,30 @@
|
||||
#ifndef _GETOPT_H
|
||||
#define _GETOPT_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int getopt(int, char * const [], const char *);
|
||||
extern char *optarg;
|
||||
extern int optind, opterr, optopt, optreset;
|
||||
|
||||
struct option {
|
||||
const char *name;
|
||||
int has_arg;
|
||||
int *flag;
|
||||
int val;
|
||||
};
|
||||
|
||||
int getopt_long(int, char *const *, const char *, const struct option *, int *);
|
||||
int getopt_long_only(int, char *const *, const char *, const struct option *, int *);
|
||||
|
||||
#define no_argument 0
|
||||
#define required_argument 1
|
||||
#define optional_argument 2
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,49 @@
|
||||
#ifndef _GLOB_H
|
||||
#define _GLOB_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <features.h>
|
||||
|
||||
#define __NEED_size_t
|
||||
|
||||
#include <bits/alltypes.h>
|
||||
|
||||
typedef struct {
|
||||
size_t gl_pathc;
|
||||
char **gl_pathv;
|
||||
size_t gl_offs;
|
||||
int __dummy1;
|
||||
void *__dummy2[5];
|
||||
} glob_t;
|
||||
|
||||
int glob(const char *__restrict, int, int (*)(const char *, int), glob_t *__restrict);
|
||||
void globfree(glob_t *);
|
||||
|
||||
#define GLOB_ERR 0x01
|
||||
#define GLOB_MARK 0x02
|
||||
#define GLOB_NOSORT 0x04
|
||||
#define GLOB_DOOFFS 0x08
|
||||
#define GLOB_NOCHECK 0x10
|
||||
#define GLOB_APPEND 0x20
|
||||
#define GLOB_NOESCAPE 0x40
|
||||
#define GLOB_PERIOD 0x80
|
||||
|
||||
#define GLOB_NOSPACE 1
|
||||
#define GLOB_ABORTED 2
|
||||
#define GLOB_NOMATCH 3
|
||||
#define GLOB_NOSYS 4
|
||||
|
||||
#if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
|
||||
#define glob64 glob
|
||||
#define globfree64 globfree
|
||||
#define glob64_t glob_t
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,53 @@
|
||||
#ifndef _GRP_H
|
||||
#define _GRP_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <features.h>
|
||||
|
||||
#define __NEED_size_t
|
||||
#define __NEED_gid_t
|
||||
|
||||
#ifdef _GNU_SOURCE
|
||||
#define __NEED_FILE
|
||||
#endif
|
||||
|
||||
#include <bits/alltypes.h>
|
||||
|
||||
struct group {
|
||||
char *gr_name;
|
||||
char *gr_passwd;
|
||||
gid_t gr_gid;
|
||||
char **gr_mem;
|
||||
};
|
||||
|
||||
struct group *getgrgid(gid_t);
|
||||
struct group *getgrnam(const char *);
|
||||
|
||||
int getgrgid_r(gid_t, struct group *, char *, size_t, struct group **);
|
||||
int getgrnam_r(const char *, struct group *, char *, size_t, struct group **);
|
||||
|
||||
#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
||||
struct group *getgrent(void);
|
||||
void endgrent(void);
|
||||
void setgrent(void);
|
||||
#endif
|
||||
|
||||
#ifdef _GNU_SOURCE
|
||||
struct group *fgetgrent(FILE *);
|
||||
int putgrent(const struct group *, FILE *);
|
||||
#endif
|
||||
|
||||
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
||||
int getgrouplist(const char *, gid_t, gid_t *, int *);
|
||||
int setgroups(size_t, const gid_t *);
|
||||
int initgroups(const char *, gid_t);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,24 @@
|
||||
#ifndef _ICONV_H
|
||||
#define _ICONV_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <features.h>
|
||||
|
||||
#define __NEED_size_t
|
||||
|
||||
#include <bits/alltypes.h>
|
||||
|
||||
typedef void *iconv_t;
|
||||
|
||||
iconv_t iconv_open(const char *, const char *);
|
||||
size_t iconv(iconv_t, char **__restrict, size_t *__restrict, char **__restrict, size_t *__restrict);
|
||||
int iconv_close(iconv_t);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,35 @@
|
||||
#ifndef _IFADDRS_H
|
||||
#define _IFADDRS_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <features.h>
|
||||
#include <netinet/in.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
struct ifaddrs {
|
||||
struct ifaddrs *ifa_next;
|
||||
char *ifa_name;
|
||||
unsigned ifa_flags;
|
||||
struct sockaddr *ifa_addr;
|
||||
struct sockaddr *ifa_netmask;
|
||||
union {
|
||||
struct sockaddr *ifu_broadaddr;
|
||||
struct sockaddr *ifu_dstaddr;
|
||||
} ifa_ifu;
|
||||
void *ifa_data;
|
||||
};
|
||||
#define ifa_broadaddr ifa_ifu.ifu_broadaddr
|
||||
#define ifa_dstaddr ifa_ifu.ifu_dstaddr
|
||||
|
||||
void freeifaddrs(struct ifaddrs *);
|
||||
int getifaddrs(struct ifaddrs **);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,229 @@
|
||||
#ifndef _INTTYPES_H
|
||||
#define _INTTYPES_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <features.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#define __NEED_wchar_t
|
||||
#include <bits/alltypes.h>
|
||||
|
||||
typedef struct { intmax_t quot, rem; } imaxdiv_t;
|
||||
|
||||
intmax_t imaxabs(intmax_t);
|
||||
imaxdiv_t imaxdiv(intmax_t, intmax_t);
|
||||
|
||||
intmax_t strtoimax(const char *__restrict, char **__restrict, int);
|
||||
uintmax_t strtoumax(const char *__restrict, char **__restrict, int);
|
||||
|
||||
intmax_t wcstoimax(const wchar_t *__restrict, wchar_t **__restrict, int);
|
||||
uintmax_t wcstoumax(const wchar_t *__restrict, wchar_t **__restrict, int);
|
||||
|
||||
#if UINTPTR_MAX == UINT64_MAX
|
||||
#define __PRI64 "l"
|
||||
#define __PRIPTR "l"
|
||||
#else
|
||||
#define __PRI64 "ll"
|
||||
#define __PRIPTR ""
|
||||
#endif
|
||||
|
||||
#define PRId8 "d"
|
||||
#define PRId16 "d"
|
||||
#define PRId32 "d"
|
||||
#define PRId64 __PRI64 "d"
|
||||
|
||||
#define PRIdLEAST8 "d"
|
||||
#define PRIdLEAST16 "d"
|
||||
#define PRIdLEAST32 "d"
|
||||
#define PRIdLEAST64 __PRI64 "d"
|
||||
|
||||
#define PRIdFAST8 "d"
|
||||
#define PRIdFAST16 "d"
|
||||
#define PRIdFAST32 "d"
|
||||
#define PRIdFAST64 __PRI64 "d"
|
||||
|
||||
#define PRIi8 "i"
|
||||
#define PRIi16 "i"
|
||||
#define PRIi32 "i"
|
||||
#define PRIi64 __PRI64 "i"
|
||||
|
||||
#define PRIiLEAST8 "i"
|
||||
#define PRIiLEAST16 "i"
|
||||
#define PRIiLEAST32 "i"
|
||||
#define PRIiLEAST64 __PRI64 "i"
|
||||
|
||||
#define PRIiFAST8 "i"
|
||||
#define PRIiFAST16 "i"
|
||||
#define PRIiFAST32 "i"
|
||||
#define PRIiFAST64 __PRI64 "i"
|
||||
|
||||
#define PRIo8 "o"
|
||||
#define PRIo16 "o"
|
||||
#define PRIo32 "o"
|
||||
#define PRIo64 __PRI64 "o"
|
||||
|
||||
#define PRIoLEAST8 "o"
|
||||
#define PRIoLEAST16 "o"
|
||||
#define PRIoLEAST32 "o"
|
||||
#define PRIoLEAST64 __PRI64 "o"
|
||||
|
||||
#define PRIoFAST8 "o"
|
||||
#define PRIoFAST16 "o"
|
||||
#define PRIoFAST32 "o"
|
||||
#define PRIoFAST64 __PRI64 "o"
|
||||
|
||||
#define PRIu8 "u"
|
||||
#define PRIu16 "u"
|
||||
#define PRIu32 "u"
|
||||
#define PRIu64 __PRI64 "u"
|
||||
|
||||
#define PRIuLEAST8 "u"
|
||||
#define PRIuLEAST16 "u"
|
||||
#define PRIuLEAST32 "u"
|
||||
#define PRIuLEAST64 __PRI64 "u"
|
||||
|
||||
#define PRIuFAST8 "u"
|
||||
#define PRIuFAST16 "u"
|
||||
#define PRIuFAST32 "u"
|
||||
#define PRIuFAST64 __PRI64 "u"
|
||||
|
||||
#define PRIx8 "x"
|
||||
#define PRIx16 "x"
|
||||
#define PRIx32 "x"
|
||||
#define PRIx64 __PRI64 "x"
|
||||
|
||||
#define PRIxLEAST8 "x"
|
||||
#define PRIxLEAST16 "x"
|
||||
#define PRIxLEAST32 "x"
|
||||
#define PRIxLEAST64 __PRI64 "x"
|
||||
|
||||
#define PRIxFAST8 "x"
|
||||
#define PRIxFAST16 "x"
|
||||
#define PRIxFAST32 "x"
|
||||
#define PRIxFAST64 __PRI64 "x"
|
||||
|
||||
#define PRIX8 "X"
|
||||
#define PRIX16 "X"
|
||||
#define PRIX32 "X"
|
||||
#define PRIX64 __PRI64 "X"
|
||||
|
||||
#define PRIXLEAST8 "X"
|
||||
#define PRIXLEAST16 "X"
|
||||
#define PRIXLEAST32 "X"
|
||||
#define PRIXLEAST64 __PRI64 "X"
|
||||
|
||||
#define PRIXFAST8 "X"
|
||||
#define PRIXFAST16 "X"
|
||||
#define PRIXFAST32 "X"
|
||||
#define PRIXFAST64 __PRI64 "X"
|
||||
|
||||
#define PRIdMAX __PRI64 "d"
|
||||
#define PRIiMAX __PRI64 "i"
|
||||
#define PRIoMAX __PRI64 "o"
|
||||
#define PRIuMAX __PRI64 "u"
|
||||
#define PRIxMAX __PRI64 "x"
|
||||
#define PRIXMAX __PRI64 "X"
|
||||
|
||||
#define PRIdPTR __PRIPTR "d"
|
||||
#define PRIiPTR __PRIPTR "i"
|
||||
#define PRIoPTR __PRIPTR "o"
|
||||
#define PRIuPTR __PRIPTR "u"
|
||||
#define PRIxPTR __PRIPTR "x"
|
||||
#define PRIXPTR __PRIPTR "X"
|
||||
|
||||
#define SCNd8 "hhd"
|
||||
#define SCNd16 "hd"
|
||||
#define SCNd32 "d"
|
||||
#define SCNd64 __PRI64 "d"
|
||||
|
||||
#define SCNdLEAST8 "hhd"
|
||||
#define SCNdLEAST16 "hd"
|
||||
#define SCNdLEAST32 "d"
|
||||
#define SCNdLEAST64 __PRI64 "d"
|
||||
|
||||
#define SCNdFAST8 "hhd"
|
||||
#define SCNdFAST16 "d"
|
||||
#define SCNdFAST32 "d"
|
||||
#define SCNdFAST64 __PRI64 "d"
|
||||
|
||||
#define SCNi8 "hhi"
|
||||
#define SCNi16 "hi"
|
||||
#define SCNi32 "i"
|
||||
#define SCNi64 __PRI64 "i"
|
||||
|
||||
#define SCNiLEAST8 "hhi"
|
||||
#define SCNiLEAST16 "hi"
|
||||
#define SCNiLEAST32 "i"
|
||||
#define SCNiLEAST64 __PRI64 "i"
|
||||
|
||||
#define SCNiFAST8 "hhi"
|
||||
#define SCNiFAST16 "i"
|
||||
#define SCNiFAST32 "i"
|
||||
#define SCNiFAST64 __PRI64 "i"
|
||||
|
||||
#define SCNu8 "hhu"
|
||||
#define SCNu16 "hu"
|
||||
#define SCNu32 "u"
|
||||
#define SCNu64 __PRI64 "u"
|
||||
|
||||
#define SCNuLEAST8 "hhu"
|
||||
#define SCNuLEAST16 "hu"
|
||||
#define SCNuLEAST32 "u"
|
||||
#define SCNuLEAST64 __PRI64 "u"
|
||||
|
||||
#define SCNuFAST8 "hhu"
|
||||
#define SCNuFAST16 "u"
|
||||
#define SCNuFAST32 "u"
|
||||
#define SCNuFAST64 __PRI64 "u"
|
||||
|
||||
#define SCNo8 "hho"
|
||||
#define SCNo16 "ho"
|
||||
#define SCNo32 "o"
|
||||
#define SCNo64 __PRI64 "o"
|
||||
|
||||
#define SCNoLEAST8 "hho"
|
||||
#define SCNoLEAST16 "ho"
|
||||
#define SCNoLEAST32 "o"
|
||||
#define SCNoLEAST64 __PRI64 "o"
|
||||
|
||||
#define SCNoFAST8 "hho"
|
||||
#define SCNoFAST16 "o"
|
||||
#define SCNoFAST32 "o"
|
||||
#define SCNoFAST64 __PRI64 "o"
|
||||
|
||||
#define SCNx8 "hhx"
|
||||
#define SCNx16 "hx"
|
||||
#define SCNx32 "x"
|
||||
#define SCNx64 __PRI64 "x"
|
||||
|
||||
#define SCNxLEAST8 "hhx"
|
||||
#define SCNxLEAST16 "hx"
|
||||
#define SCNxLEAST32 "x"
|
||||
#define SCNxLEAST64 __PRI64 "x"
|
||||
|
||||
#define SCNxFAST8 "hhx"
|
||||
#define SCNxFAST16 "x"
|
||||
#define SCNxFAST32 "x"
|
||||
#define SCNxFAST64 __PRI64 "x"
|
||||
|
||||
#define SCNdMAX __PRI64 "d"
|
||||
#define SCNiMAX __PRI64 "i"
|
||||
#define SCNoMAX __PRI64 "o"
|
||||
#define SCNuMAX __PRI64 "u"
|
||||
#define SCNxMAX __PRI64 "x"
|
||||
|
||||
#define SCNdPTR __PRIPTR "d"
|
||||
#define SCNiPTR __PRIPTR "i"
|
||||
#define SCNoPTR __PRIPTR "o"
|
||||
#define SCNuPTR __PRIPTR "u"
|
||||
#define SCNxPTR __PRIPTR "x"
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
#ifndef _ISO646_H
|
||||
#define _ISO646_H
|
||||
|
||||
#ifndef __cplusplus
|
||||
|
||||
#define and &&
|
||||
#define and_eq &=
|
||||
#define bitand &
|
||||
#define bitor |
|
||||
#define compl ~
|
||||
#define not !
|
||||
#define not_eq !=
|
||||
#define or ||
|
||||
#define or_eq |=
|
||||
#define xor ^
|
||||
#define xor_eq ^=
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,98 @@
|
||||
#ifndef _LANGINFO_H
|
||||
#define _LANGINFO_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <features.h>
|
||||
#include <nl_types.h>
|
||||
|
||||
#define __NEED_locale_t
|
||||
|
||||
#include <bits/alltypes.h>
|
||||
|
||||
#define ABDAY_1 0x20000
|
||||
#define ABDAY_2 0x20001
|
||||
#define ABDAY_3 0x20002
|
||||
#define ABDAY_4 0x20003
|
||||
#define ABDAY_5 0x20004
|
||||
#define ABDAY_6 0x20005
|
||||
#define ABDAY_7 0x20006
|
||||
|
||||
#define DAY_1 0x20007
|
||||
#define DAY_2 0x20008
|
||||
#define DAY_3 0x20009
|
||||
#define DAY_4 0x2000A
|
||||
#define DAY_5 0x2000B
|
||||
#define DAY_6 0x2000C
|
||||
#define DAY_7 0x2000D
|
||||
|
||||
#define ABMON_1 0x2000E
|
||||
#define ABMON_2 0x2000F
|
||||
#define ABMON_3 0x20010
|
||||
#define ABMON_4 0x20011
|
||||
#define ABMON_5 0x20012
|
||||
#define ABMON_6 0x20013
|
||||
#define ABMON_7 0x20014
|
||||
#define ABMON_8 0x20015
|
||||
#define ABMON_9 0x20016
|
||||
#define ABMON_10 0x20017
|
||||
#define ABMON_11 0x20018
|
||||
#define ABMON_12 0x20019
|
||||
|
||||
#define MON_1 0x2001A
|
||||
#define MON_2 0x2001B
|
||||
#define MON_3 0x2001C
|
||||
#define MON_4 0x2001D
|
||||
#define MON_5 0x2001E
|
||||
#define MON_6 0x2001F
|
||||
#define MON_7 0x20020
|
||||
#define MON_8 0x20021
|
||||
#define MON_9 0x20022
|
||||
#define MON_10 0x20023
|
||||
#define MON_11 0x20024
|
||||
#define MON_12 0x20025
|
||||
|
||||
#define AM_STR 0x20026
|
||||
#define PM_STR 0x20027
|
||||
|
||||
#define D_T_FMT 0x20028
|
||||
#define D_FMT 0x20029
|
||||
#define T_FMT 0x2002A
|
||||
#define T_FMT_AMPM 0x2002B
|
||||
|
||||
#define ERA 0x2002C
|
||||
#define ERA_D_FMT 0x2002E
|
||||
#define ALT_DIGITS 0x2002F
|
||||
#define ERA_D_T_FMT 0x20030
|
||||
#define ERA_T_FMT 0x20031
|
||||
|
||||
#define CODESET 14
|
||||
|
||||
#define CRNCYSTR 0x4000F
|
||||
|
||||
#define RADIXCHAR 0x10000
|
||||
#define THOUSEP 0x10001
|
||||
#define YESEXPR 0x50000
|
||||
#define NOEXPR 0x50001
|
||||
|
||||
#define _NL_LOCALE_NAME(cat) (((cat)<<16) | 0xffff)
|
||||
|
||||
#if defined(_GNU_SOURCE)
|
||||
#define NL_LOCALE_NAME(cat) _NL_LOCALE_NAME(cat)
|
||||
#endif
|
||||
|
||||
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
||||
#define YESSTR 0x50002
|
||||
#define NOSTR 0x50003
|
||||
#endif
|
||||
|
||||
char *nl_langinfo(nl_item);
|
||||
char *nl_langinfo_l(nl_item, locale_t);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1 @@
|
||||
#include <utmp.h>
|
||||
@@ -0,0 +1,15 @@
|
||||
#ifndef _LIBGEN_H
|
||||
#define _LIBGEN_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
char *dirname(char *);
|
||||
char *basename(char *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,33 @@
|
||||
#ifndef _LIBINTL_H
|
||||
#define _LIBINTL_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define __USE_GNU_GETTEXT 1
|
||||
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 1 : -1)
|
||||
|
||||
#if __GNUC__ >= 3
|
||||
#define __fa(n) __attribute__ ((__format_arg__ (n)))
|
||||
#else
|
||||
#define __fa(n)
|
||||
#endif
|
||||
|
||||
char *gettext(const char *) __fa(1);
|
||||
char *dgettext(const char *, const char *) __fa(2);
|
||||
char *dcgettext(const char *, const char *, int) __fa(2);
|
||||
char *ngettext(const char *, const char *, unsigned long) __fa(1) __fa(2);
|
||||
char *dngettext(const char *, const char *, const char *, unsigned long) __fa(2) __fa(3);
|
||||
char *dcngettext(const char *, const char *, const char *, unsigned long, int) __fa(2) __fa(3);
|
||||
char *textdomain(const char *);
|
||||
char *bindtextdomain (const char *, const char *);
|
||||
char *bind_textdomain_codeset(const char *, const char *);
|
||||
|
||||
#undef __fa
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,158 @@
|
||||
#ifndef _LIMITS_H
|
||||
#define _LIMITS_H
|
||||
|
||||
#include <features.h>
|
||||
|
||||
/* Most limits are system-specific */
|
||||
|
||||
#include <bits/limits.h>
|
||||
|
||||
/* Support signed or unsigned plain-char */
|
||||
|
||||
#if '\xff' > 0
|
||||
#define CHAR_MIN 0
|
||||
#define CHAR_MAX 255
|
||||
#else
|
||||
#define CHAR_MIN (-128)
|
||||
#define CHAR_MAX 127
|
||||
#endif
|
||||
|
||||
/* Some universal constants... */
|
||||
|
||||
#define CHAR_BIT 8
|
||||
#define SCHAR_MIN (-128)
|
||||
#define SCHAR_MAX 127
|
||||
#define UCHAR_MAX 255
|
||||
#define SHRT_MIN (-1-0x7fff)
|
||||
#define SHRT_MAX 0x7fff
|
||||
#define USHRT_MAX 0xffff
|
||||
#define INT_MIN (-1-0x7fffffff)
|
||||
#define INT_MAX 0x7fffffff
|
||||
#define UINT_MAX 0xffffffffU
|
||||
#define LONG_MIN (-LONG_MAX-1)
|
||||
#define ULONG_MAX (2UL*LONG_MAX+1)
|
||||
#define LLONG_MIN (-LLONG_MAX-1)
|
||||
#define ULLONG_MAX (2ULL*LLONG_MAX+1)
|
||||
|
||||
#define MB_LEN_MAX 4
|
||||
|
||||
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
|
||||
|| defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
||||
|
||||
#define PIPE_BUF 4096
|
||||
#define FILESIZEBITS 64
|
||||
#define NAME_MAX 255
|
||||
#define PATH_MAX 4096
|
||||
#define NGROUPS_MAX 32
|
||||
#define ARG_MAX 131072
|
||||
#define IOV_MAX 1024
|
||||
#define SYMLOOP_MAX 40
|
||||
#define WORD_BIT 32
|
||||
#define SSIZE_MAX LONG_MAX
|
||||
#define TZNAME_MAX 6
|
||||
#define TTY_NAME_MAX 32
|
||||
#define HOST_NAME_MAX 255
|
||||
|
||||
/* Implementation choices... */
|
||||
|
||||
#define PTHREAD_KEYS_MAX 128
|
||||
#define PTHREAD_STACK_MIN 2048
|
||||
#define PTHREAD_DESTRUCTOR_ITERATIONS 4
|
||||
#define SEM_VALUE_MAX 0x7fffffff
|
||||
#define SEM_NSEMS_MAX 256
|
||||
#define DELAYTIMER_MAX 0x7fffffff
|
||||
#define MQ_PRIO_MAX 32768
|
||||
#define LOGIN_NAME_MAX 256
|
||||
|
||||
/* Arbitrary numbers... */
|
||||
|
||||
#define BC_BASE_MAX 99
|
||||
#define BC_DIM_MAX 2048
|
||||
#define BC_SCALE_MAX 99
|
||||
#define BC_STRING_MAX 1000
|
||||
#define CHARCLASS_NAME_MAX 14
|
||||
#define COLL_WEIGHTS_MAX 2
|
||||
#define EXPR_NEST_MAX 32
|
||||
#define LINE_MAX 4096
|
||||
#define RE_DUP_MAX 255
|
||||
|
||||
#define NL_ARGMAX 9
|
||||
#define NL_MSGMAX 32767
|
||||
#define NL_SETMAX 255
|
||||
#define NL_TEXTMAX 2048
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) || defined(_XOPEN_SOURCE)
|
||||
|
||||
#ifdef PAGESIZE
|
||||
#define PAGE_SIZE PAGESIZE
|
||||
#endif
|
||||
#define NZERO 20
|
||||
#define NL_LANGMAX 32
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) \
|
||||
|| (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE+0 < 700)
|
||||
|
||||
#define NL_NMAX 16
|
||||
|
||||
#endif
|
||||
|
||||
/* POSIX/SUS requirements follow. These numbers come directly
|
||||
* from SUS and have nothing to do with the host system. */
|
||||
|
||||
#define _POSIX_AIO_LISTIO_MAX 2
|
||||
#define _POSIX_AIO_MAX 1
|
||||
#define _POSIX_ARG_MAX 4096
|
||||
#define _POSIX_CHILD_MAX 25
|
||||
#define _POSIX_CLOCKRES_MIN 20000000
|
||||
#define _POSIX_DELAYTIMER_MAX 32
|
||||
#define _POSIX_HOST_NAME_MAX 255
|
||||
#define _POSIX_LINK_MAX 8
|
||||
#define _POSIX_LOGIN_NAME_MAX 9
|
||||
#define _POSIX_MAX_CANON 255
|
||||
#define _POSIX_MAX_INPUT 255
|
||||
#define _POSIX_MQ_OPEN_MAX 8
|
||||
#define _POSIX_MQ_PRIO_MAX 32
|
||||
#define _POSIX_NAME_MAX 14
|
||||
#define _POSIX_NGROUPS_MAX 8
|
||||
#define _POSIX_OPEN_MAX 20
|
||||
#define _POSIX_PATH_MAX 256
|
||||
#define _POSIX_PIPE_BUF 512
|
||||
#define _POSIX_RE_DUP_MAX 255
|
||||
#define _POSIX_RTSIG_MAX 8
|
||||
#define _POSIX_SEM_NSEMS_MAX 256
|
||||
#define _POSIX_SEM_VALUE_MAX 32767
|
||||
#define _POSIX_SIGQUEUE_MAX 32
|
||||
#define _POSIX_SSIZE_MAX 32767
|
||||
#define _POSIX_STREAM_MAX 8
|
||||
#define _POSIX_SS_REPL_MAX 4
|
||||
#define _POSIX_SYMLINK_MAX 255
|
||||
#define _POSIX_SYMLOOP_MAX 8
|
||||
#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
|
||||
#define _POSIX_THREAD_KEYS_MAX 128
|
||||
#define _POSIX_THREAD_THREADS_MAX 64
|
||||
#define _POSIX_TIMER_MAX 32
|
||||
#define _POSIX_TRACE_EVENT_NAME_MAX 30
|
||||
#define _POSIX_TRACE_NAME_MAX 8
|
||||
#define _POSIX_TRACE_SYS_MAX 8
|
||||
#define _POSIX_TRACE_USER_EVENT_MAX 32
|
||||
#define _POSIX_TTY_NAME_MAX 9
|
||||
#define _POSIX_TZNAME_MAX 6
|
||||
#define _POSIX2_BC_BASE_MAX 99
|
||||
#define _POSIX2_BC_DIM_MAX 2048
|
||||
#define _POSIX2_BC_SCALE_MAX 99
|
||||
#define _POSIX2_BC_STRING_MAX 1000
|
||||
#define _POSIX2_CHARCLASS_NAME_MAX 14
|
||||
#define _POSIX2_COLL_WEIGHTS_MAX 2
|
||||
#define _POSIX2_EXPR_NEST_MAX 32
|
||||
#define _POSIX2_LINE_MAX 2048
|
||||
#define _POSIX2_RE_DUP_MAX 255
|
||||
|
||||
#define _XOPEN_IOV_MAX 16
|
||||
#define _XOPEN_NAME_MAX 255
|
||||
#define _XOPEN_PATH_MAX 1024
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,53 @@
|
||||
#ifndef _LINK_H
|
||||
#define _LINK_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <elf.h>
|
||||
#define __NEED_size_t
|
||||
#define __NEED_uint32_t
|
||||
#include <bits/alltypes.h>
|
||||
|
||||
#if UINTPTR_MAX > 0xffffffff
|
||||
#define ElfW(type) Elf64_ ## type
|
||||
#else
|
||||
#define ElfW(type) Elf32_ ## type
|
||||
#endif
|
||||
|
||||
#include <bits/link.h>
|
||||
|
||||
struct dl_phdr_info {
|
||||
ElfW(Addr) dlpi_addr;
|
||||
const char *dlpi_name;
|
||||
const ElfW(Phdr) *dlpi_phdr;
|
||||
ElfW(Half) dlpi_phnum;
|
||||
unsigned long long int dlpi_adds;
|
||||
unsigned long long int dlpi_subs;
|
||||
size_t dlpi_tls_modid;
|
||||
void *dlpi_tls_data;
|
||||
};
|
||||
|
||||
struct link_map {
|
||||
ElfW(Addr) l_addr;
|
||||
char *l_name;
|
||||
ElfW(Dyn) *l_ld;
|
||||
struct link_map *l_next, *l_prev;
|
||||
};
|
||||
|
||||
struct r_debug {
|
||||
int r_version;
|
||||
struct link_map *r_map;
|
||||
ElfW(Addr) r_brk;
|
||||
enum { RT_CONSISTENT, RT_ADD, RT_DELETE } r_state;
|
||||
ElfW(Addr) r_ldbase;
|
||||
};
|
||||
|
||||
int dl_iterate_phdr(int (*)(struct dl_phdr_info *, size_t, void *), void *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,86 @@
|
||||
#ifndef _LOCALE_H
|
||||
#define _LOCALE_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <features.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define NULL 0L
|
||||
#else
|
||||
#define NULL ((void*)0)
|
||||
#endif
|
||||
|
||||
#define LC_CTYPE 0
|
||||
#define LC_NUMERIC 1
|
||||
#define LC_TIME 2
|
||||
#define LC_COLLATE 3
|
||||
#define LC_MONETARY 4
|
||||
#define LC_MESSAGES 5
|
||||
#define LC_ALL 6
|
||||
|
||||
struct lconv {
|
||||
char *decimal_point;
|
||||
char *thousands_sep;
|
||||
char *grouping;
|
||||
|
||||
char *int_curr_symbol;
|
||||
char *currency_symbol;
|
||||
char *mon_decimal_point;
|
||||
char *mon_thousands_sep;
|
||||
char *mon_grouping;
|
||||
char *positive_sign;
|
||||
char *negative_sign;
|
||||
char int_frac_digits;
|
||||
char frac_digits;
|
||||
char p_cs_precedes;
|
||||
char p_sep_by_space;
|
||||
char n_cs_precedes;
|
||||
char n_sep_by_space;
|
||||
char p_sign_posn;
|
||||
char n_sign_posn;
|
||||
char int_p_cs_precedes;
|
||||
char int_p_sep_by_space;
|
||||
char int_n_cs_precedes;
|
||||
char int_n_sep_by_space;
|
||||
char int_p_sign_posn;
|
||||
char int_n_sign_posn;
|
||||
};
|
||||
|
||||
|
||||
char *setlocale (int, const char *);
|
||||
struct lconv *localeconv(void);
|
||||
|
||||
|
||||
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
|
||||
|| defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
||||
|
||||
#define __NEED_locale_t
|
||||
|
||||
#include <bits/alltypes.h>
|
||||
|
||||
#define LC_GLOBAL_LOCALE ((locale_t)-1)
|
||||
|
||||
#define LC_CTYPE_MASK (1<<LC_CTYPE)
|
||||
#define LC_NUMERIC_MASK (1<<LC_NUMERIC)
|
||||
#define LC_TIME_MASK (1<<LC_TIME)
|
||||
#define LC_COLLATE_MASK (1<<LC_COLLATE)
|
||||
#define LC_MONETARY_MASK (1<<LC_MONETARY)
|
||||
#define LC_MESSAGES_MASK (1<<LC_MESSAGES)
|
||||
#define LC_ALL_MASK 0x7fffffff
|
||||
|
||||
locale_t duplocale(locale_t);
|
||||
void freelocale(locale_t);
|
||||
locale_t newlocale(int, const char *, locale_t);
|
||||
locale_t uselocale(locale_t);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user