feat: update upstream musl libc to v1.2.6

This commit is contained in:
2026-06-27 13:16:53 +08:00
29 changed files with 533 additions and 8 deletions
+1 -1
View File
@@ -1 +1 @@
1.2.5
1.2.6
+53
View File
@@ -2438,3 +2438,56 @@ arch-specific bugs fixed:
- riscv64 icache flush operation was non-functional
- sh sigsetjmp failed to properly restore call-saved register r8 on return
- sh dlsym RTLD_NEXT did not identify calling module correctly
1.2.6 release notes
new features:
- posix_getdents interface (new in POSIX-2024)
- renameat2 interface (linux extension)
- iconv support for CP858
- vdso clock_gettime for riscv{32,64}, powerpc{,64}, and s390x
- loongarch64 TLSDESC support
- exposed __getauxval for compiler runtime use detecting cpu features
compatibility:
- initgroups no longer artificially limits number of supplementary groups
- getusershell now skips blank lines and comments
- exit is now explicitly thread-safe (possible future requirement)
- atexit now fails rather than deadlocking if called from late dtor
- strerror now has error strings for EUCLEAN and ENAVAIL
- isatty no longer collapses errors to ENOTTY
- sched.h namespace pollution with _GNU_SOURCE is reduced
- hasmntopt now matches only whole options, not arbitrary substrings
- shadow.h no longer declares an unimplemented sgetspent interface
- vdso with missing sysv hash table (only gnu hash) is now supported
conformance:
- pwrite now handles O_APPEND correctly, reports error if it can't
- mbnrtowcs now conforms to new POSIX-2024 requirement for partial character
- iconv GBK now properly includes euro symbol
- strptime now accepts conversion specifiers added in POSIX-2024
- inet_ntop IPv6 "zero compression" now conforms to RFC 5952
bugs fixed:
- iconv euc-kr decoder could do oob writes on invalid inputs (CVE-2025-26519)
- iconv shift_jis decoder could produce wrong outputs for some invalid inputs
- printf did not honor hex float precision correctly in some cases
- lost or delayed wakes in sem_post under race condition
- termios input speed handling was wrong
- strcasestr failed to match zero-length needle
- fma handled corner case with negative zero wrongly
- syslog LOG_MAKEPRI macro was incorrect
- timer_create is no longer affected by known pthread_barrier bugs
- sysconf(_SC_MINSIGSTKSZ) computed min size incorrectly
- statx emulation left some fields uninitialized
- mntent wrongly included final newline in parsed field output
- SIGEV_THREAD timers could abort process if SIGTIMER became unblocked
- bind_textdomain_codeset returned wrong value
arch-specific bugs fixed:
- early dynamic linker handled page size wrong on dynamic pagesize archs
- arm and aarch64 crti/n files had wrong alignment
- m68k POLLWRNORM and POLLWRBAND values were incorrect
- x32 mq ABI was mismatched
+20
View File
@@ -296,12 +296,32 @@
#define __NR_process_madvise 440
#define __NR_epoll_pwait2 441
#define __NR_mount_setattr 442
#define __NR_quotactl_fd 443
#define __NR_landlock_create_ruleset 444
#define __NR_landlock_add_rule 445
#define __NR_landlock_restrict_self 446
#define __NR_memfd_secret 447
#define __NR_process_mrelease 448
#define __NR_futex_waitv 449
#define __NR_set_mempolicy_home_node 450
#define __NR_cachestat 451
#define __NR_fchmodat2 452
#define __NR_map_shadow_stack 453
#define __NR_futex_wake 454
#define __NR_futex_wait 455
#define __NR_futex_requeue 456
#define __NR_statmount 457
#define __NR_listmount 458
#define __NR_lsm_get_self_attr 459
#define __NR_lsm_set_self_attr 460
#define __NR_lsm_list_modules 461
#define __NR_mseal 462
#define __NR_setxattrat 463
#define __NR_getxattrat 464
#define __NR_listxattrat 465
#define __NR_removexattrat 466
#define __NR_open_tree_attr 467
#define __NR_file_getattr 468
#define __NR_file_setattr 469
#define __NR_listns 470
+19
View File
@@ -396,6 +396,7 @@
#define __NR_process_madvise 440
#define __NR_epoll_pwait2 441
#define __NR_mount_setattr 442
#define __NR_quotactl_fd 443
#define __NR_landlock_create_ruleset 444
#define __NR_landlock_add_rule 445
#define __NR_landlock_restrict_self 446
@@ -404,6 +405,24 @@
#define __NR_set_mempolicy_home_node 450
#define __NR_cachestat 451
#define __NR_fchmodat2 452
#define __NR_map_shadow_stack 453
#define __NR_futex_wake 454
#define __NR_futex_wait 455
#define __NR_futex_requeue 456
#define __NR_statmount 457
#define __NR_listmount 458
#define __NR_lsm_get_self_attr 459
#define __NR_lsm_set_self_attr 460
#define __NR_lsm_list_modules 461
#define __NR_mseal 462
#define __NR_setxattrat 463
#define __NR_getxattrat 464
#define __NR_listxattrat 465
#define __NR_removexattrat 466
#define __NR_open_tree_attr 467
#define __NR_file_getattr 468
#define __NR_file_setattr 469
#define __NR_listns 470
#define __ARM_NR_breakpoint 0x0f0001
#define __ARM_NR_cacheflush 0x0f0002
+19
View File
@@ -433,6 +433,7 @@
#define __NR_process_madvise 440
#define __NR_epoll_pwait2 441
#define __NR_mount_setattr 442
#define __NR_quotactl_fd 443
#define __NR_landlock_create_ruleset 444
#define __NR_landlock_add_rule 445
#define __NR_landlock_restrict_self 446
@@ -442,4 +443,22 @@
#define __NR_set_mempolicy_home_node 450
#define __NR_cachestat 451
#define __NR_fchmodat2 452
#define __NR_map_shadow_stack 453
#define __NR_futex_wake 454
#define __NR_futex_wait 455
#define __NR_futex_requeue 456
#define __NR_statmount 457
#define __NR_listmount 458
#define __NR_lsm_get_self_attr 459
#define __NR_lsm_set_self_attr 460
#define __NR_lsm_list_modules 461
#define __NR_mseal 462
#define __NR_setxattrat 463
#define __NR_getxattrat 464
#define __NR_listxattrat 465
#define __NR_removexattrat 466
#define __NR_open_tree_attr 467
#define __NR_file_getattr 468
#define __NR_file_setattr 469
#define __NR_listns 470
+43
View File
@@ -18,6 +18,10 @@
#endif
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#define SC_USED_FP (1U << 0)
#define SC_ADDRERR_RD (1U << 30)
#define SC_ADDRERR_WR (1U << 31)
typedef unsigned long greg_t, gregset_t[32];
struct sigcontext {
@@ -26,6 +30,45 @@ struct sigcontext {
unsigned sc_flags;
unsigned long sc_extcontext[] __attribute__((__aligned__(16)));
};
#define CONTEXT_INFO_ALIGN 16
struct sctx_info {
unsigned magic;
unsigned size;
unsigned long padding;
};
#define FPU_CTX_MAGIC 0x46505501
#define FPU_CTX_ALIGN 8
struct fpu_context {
unsigned long regs[32];
unsigned long fcc;
unsigned fcsr;
};
#define LSX_CTX_MAGIC 0x53580001
#define LSX_CTX_ALIGN 16
struct lsx_context {
unsigned long regs[2*32];
unsigned long fcc;
unsigned fcsr;
};
#define LASX_CTX_MAGIC 0x41535801
#define LASX_CTX_ALIGN 32
struct lasx_context {
unsigned long regs[4*32];
unsigned long fcc;
unsigned fcsr;
};
#define LBT_CTX_MAGIC 0x42540001
#define LBT_CTX_ALIGN 8
struct lbt_context {
unsigned long regs[4];
unsigned eflags;
unsigned ftop;
};
#endif
typedef struct {
+14
View File
@@ -305,6 +305,20 @@
#define __NR_futex_wake 454
#define __NR_futex_wait 455
#define __NR_futex_requeue 456
#define __NR_statmount 457
#define __NR_listmount 458
#define __NR_lsm_get_self_attr 459
#define __NR_lsm_set_self_attr 460
#define __NR_lsm_list_modules 461
#define __NR_mseal 462
#define __NR_setxattrat 463
#define __NR_getxattrat 464
#define __NR_listxattrat 465
#define __NR_removexattrat 466
#define __NR_open_tree_attr 467
#define __NR_file_getattr 468
#define __NR_file_setattr 469
#define __NR_listns 470
#define __NR_fcntl __NR3264_fcntl
#define __NR_statfs __NR3264_statfs
#define __NR_fstatfs __NR3264_fstatfs
+14
View File
@@ -22,3 +22,17 @@ typedef union {
float f;
} elf_fpreg_t;
typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
typedef union
{
__attribute__((__aligned__(16)))
double d[2];
float f[4];
} elf_lsxregset_t[32];
typedef union
{
__attribute__((__aligned__(32)))
double d[4];
float f[8];
} elf_lasxregset_t[32];
+19
View File
@@ -413,6 +413,7 @@
#define __NR_process_madvise 440
#define __NR_epoll_pwait2 441
#define __NR_mount_setattr 442
#define __NR_quotactl_fd 443
#define __NR_landlock_create_ruleset 444
#define __NR_landlock_add_rule 445
#define __NR_landlock_restrict_self 446
@@ -421,3 +422,21 @@
#define __NR_set_mempolicy_home_node 450
#define __NR_cachestat 451
#define __NR_fchmodat2 452
#define __NR_map_shadow_stack 453
#define __NR_futex_wake 454
#define __NR_futex_wait 455
#define __NR_futex_requeue 456
#define __NR_statmount 457
#define __NR_listmount 458
#define __NR_lsm_get_self_attr 459
#define __NR_lsm_set_self_attr 460
#define __NR_lsm_list_modules 461
#define __NR_mseal 462
#define __NR_setxattrat 463
#define __NR_getxattrat 464
#define __NR_listxattrat 465
#define __NR_removexattrat 466
#define __NR_open_tree_attr 467
#define __NR_file_getattr 468
#define __NR_file_setattr 469
#define __NR_listns 470
+19
View File
@@ -434,6 +434,7 @@
#define __NR_process_madvise 440
#define __NR_epoll_pwait2 441
#define __NR_mount_setattr 442
#define __NR_quotactl_fd 443
#define __NR_landlock_create_ruleset 444
#define __NR_landlock_add_rule 445
#define __NR_landlock_restrict_self 446
@@ -442,4 +443,22 @@
#define __NR_set_mempolicy_home_node 450
#define __NR_cachestat 451
#define __NR_fchmodat2 452
#define __NR_map_shadow_stack 453
#define __NR_futex_wake 454
#define __NR_futex_wait 455
#define __NR_futex_requeue 456
#define __NR_statmount 457
#define __NR_listmount 458
#define __NR_lsm_get_self_attr 459
#define __NR_lsm_set_self_attr 460
#define __NR_lsm_list_modules 461
#define __NR_mseal 462
#define __NR_setxattrat 463
#define __NR_getxattrat 464
#define __NR_listxattrat 465
#define __NR_removexattrat 466
#define __NR_open_tree_attr 467
#define __NR_file_getattr 468
#define __NR_file_setattr 469
#define __NR_listns 470
+19
View File
@@ -415,6 +415,7 @@
#define __NR_process_madvise 4440
#define __NR_epoll_pwait2 4441
#define __NR_mount_setattr 4442
#define __NR_quotactl_fd 4443
#define __NR_landlock_create_ruleset 4444
#define __NR_landlock_add_rule 4445
#define __NR_landlock_restrict_self 4446
@@ -423,4 +424,22 @@
#define __NR_set_mempolicy_home_node 4450
#define __NR_cachestat 4451
#define __NR_fchmodat2 4452
#define __NR_map_shadow_stack 4453
#define __NR_futex_wake 4454
#define __NR_futex_wait 4455
#define __NR_futex_requeue 4456
#define __NR_statmount 4457
#define __NR_listmount 4458
#define __NR_lsm_get_self_attr 4459
#define __NR_lsm_set_self_attr 4460
#define __NR_lsm_list_modules 4461
#define __NR_mseal 4462
#define __NR_setxattrat 4463
#define __NR_getxattrat 4464
#define __NR_listxattrat 4465
#define __NR_removexattrat 4466
#define __NR_open_tree_attr 4467
#define __NR_file_getattr 4468
#define __NR_file_setattr 4469
#define __NR_listns 4470
+19
View File
@@ -345,6 +345,7 @@
#define __NR_process_madvise 5440
#define __NR_epoll_pwait2 5441
#define __NR_mount_setattr 5442
#define __NR_quotactl_fd 5443
#define __NR_landlock_create_ruleset 5444
#define __NR_landlock_add_rule 5445
#define __NR_landlock_restrict_self 5446
@@ -353,4 +354,22 @@
#define __NR_set_mempolicy_home_node 5450
#define __NR_cachestat 5451
#define __NR_fchmodat2 5452
#define __NR_map_shadow_stack 5453
#define __NR_futex_wake 5454
#define __NR_futex_wait 5455
#define __NR_futex_requeue 5456
#define __NR_statmount 5457
#define __NR_listmount 5458
#define __NR_lsm_get_self_attr 5459
#define __NR_lsm_set_self_attr 5460
#define __NR_lsm_list_modules 5461
#define __NR_mseal 5462
#define __NR_setxattrat 5463
#define __NR_getxattrat 5464
#define __NR_listxattrat 5465
#define __NR_removexattrat 5466
#define __NR_open_tree_attr 5467
#define __NR_file_getattr 5468
#define __NR_file_setattr 5469
#define __NR_listns 5470
+19
View File
@@ -369,6 +369,7 @@
#define __NR_process_madvise 6440
#define __NR_epoll_pwait2 6441
#define __NR_mount_setattr 6442
#define __NR_quotactl_fd 6443
#define __NR_landlock_create_ruleset 6444
#define __NR_landlock_add_rule 6445
#define __NR_landlock_restrict_self 6446
@@ -377,4 +378,22 @@
#define __NR_set_mempolicy_home_node 6450
#define __NR_cachestat 6451
#define __NR_fchmodat2 6452
#define __NR_map_shadow_stack 6453
#define __NR_futex_wake 6454
#define __NR_futex_wait 6455
#define __NR_futex_requeue 6456
#define __NR_statmount 6457
#define __NR_listmount 6458
#define __NR_lsm_get_self_attr 6459
#define __NR_lsm_set_self_attr 6460
#define __NR_lsm_list_modules 6461
#define __NR_mseal 6462
#define __NR_setxattrat 6463
#define __NR_getxattrat 6464
#define __NR_listxattrat 6465
#define __NR_removexattrat 6466
#define __NR_open_tree_attr 6467
#define __NR_file_getattr 6468
#define __NR_file_setattr 6469
#define __NR_listns 6470
+19
View File
@@ -318,6 +318,7 @@
#define __NR_process_madvise 440
#define __NR_epoll_pwait2 441
#define __NR_mount_setattr 442
#define __NR_quotactl_fd 443
#define __NR_landlock_create_ruleset 444
#define __NR_landlock_add_rule 445
#define __NR_landlock_restrict_self 446
@@ -326,4 +327,22 @@
#define __NR_set_mempolicy_home_node 450
#define __NR_cachestat 451
#define __NR_fchmodat2 452
#define __NR_map_shadow_stack 453
#define __NR_futex_wake 454
#define __NR_futex_wait 455
#define __NR_futex_requeue 456
#define __NR_statmount 457
#define __NR_listmount 458
#define __NR_lsm_get_self_attr 459
#define __NR_lsm_set_self_attr 460
#define __NR_lsm_list_modules 461
#define __NR_mseal 462
#define __NR_setxattrat 463
#define __NR_getxattrat 464
#define __NR_listxattrat 465
#define __NR_removexattrat 466
#define __NR_open_tree_attr 467
#define __NR_file_getattr 468
#define __NR_file_setattr 469
#define __NR_listns 470
+19
View File
@@ -422,6 +422,7 @@
#define __NR_process_madvise 440
#define __NR_epoll_pwait2 441
#define __NR_mount_setattr 442
#define __NR_quotactl_fd 443
#define __NR_landlock_create_ruleset 444
#define __NR_landlock_add_rule 445
#define __NR_landlock_restrict_self 446
@@ -430,4 +431,22 @@
#define __NR_set_mempolicy_home_node 450
#define __NR_cachestat 451
#define __NR_fchmodat2 452
#define __NR_map_shadow_stack 453
#define __NR_futex_wake 454
#define __NR_futex_wait 455
#define __NR_futex_requeue 456
#define __NR_statmount 457
#define __NR_listmount 458
#define __NR_lsm_get_self_attr 459
#define __NR_lsm_set_self_attr 460
#define __NR_lsm_list_modules 461
#define __NR_mseal 462
#define __NR_setxattrat 463
#define __NR_getxattrat 464
#define __NR_listxattrat 465
#define __NR_removexattrat 466
#define __NR_open_tree_attr 467
#define __NR_file_getattr 468
#define __NR_file_setattr 469
#define __NR_listns 470
+19
View File
@@ -394,6 +394,7 @@
#define __NR_process_madvise 440
#define __NR_epoll_pwait2 441
#define __NR_mount_setattr 442
#define __NR_quotactl_fd 443
#define __NR_landlock_create_ruleset 444
#define __NR_landlock_add_rule 445
#define __NR_landlock_restrict_self 446
@@ -402,4 +403,22 @@
#define __NR_set_mempolicy_home_node 450
#define __NR_cachestat 451
#define __NR_fchmodat2 452
#define __NR_map_shadow_stack 453
#define __NR_futex_wake 454
#define __NR_futex_wait 455
#define __NR_futex_requeue 456
#define __NR_statmount 457
#define __NR_listmount 458
#define __NR_lsm_get_self_attr 459
#define __NR_lsm_set_self_attr 460
#define __NR_lsm_list_modules 461
#define __NR_mseal 462
#define __NR_setxattrat 463
#define __NR_getxattrat 464
#define __NR_listxattrat 465
#define __NR_removexattrat 466
#define __NR_open_tree_attr 467
#define __NR_file_getattr 468
#define __NR_file_setattr 469
#define __NR_listns 470
+20
View File
@@ -289,12 +289,32 @@
#define __NR_landlock_create_ruleset 444
#define __NR_landlock_add_rule 445
#define __NR_landlock_restrict_self 446
#define __NR_memfd_secret 447
#define __NR_process_mrelease 448
#define __NR_futex_waitv 449
#define __NR_set_mempolicy_home_node 450
#define __NR_cachestat 451
#define __NR_fchmodat2 452
#define __NR_map_shadow_stack 453
#define __NR_futex __NR_futex_time64
#define __NR_futex_wake 454
#define __NR_futex_wait 455
#define __NR_futex_requeue 456
#define __NR_statmount 457
#define __NR_listmount 458
#define __NR_lsm_get_self_attr 459
#define __NR_lsm_set_self_attr 460
#define __NR_lsm_list_modules 461
#define __NR_mseal 462
#define __NR_setxattrat 463
#define __NR_getxattrat 464
#define __NR_listxattrat 465
#define __NR_removexattrat 466
#define __NR_open_tree_attr 467
#define __NR_file_getattr 468
#define __NR_file_setattr 469
#define __NR_listns 470
#define __NR_sysriscv __NR_arch_specific_syscall
#define __NR_riscv_flush_icache (__NR_sysriscv + 15)
#define __NR_riscv_hwprobe (__NR_sysriscv + 14)
+21
View File
@@ -296,14 +296,35 @@
#define __NR_process_madvise 440
#define __NR_epoll_pwait2 441
#define __NR_mount_setattr 442
#define __NR_quotactl_fd 443
#define __NR_landlock_create_ruleset 444
#define __NR_landlock_add_rule 445
#define __NR_landlock_restrict_self 446
#define __NR_memfd_secret 447
#define __NR_process_mrelease 448
#define __NR_futex_waitv 449
#define __NR_set_mempolicy_home_node 450
#define __NR_cachestat 451
#define __NR_fchmodat2 452
#define __NR_map_shadow_stack 453
#define __NR_futex_wake 454
#define __NR_futex_wait 455
#define __NR_futex_requeue 456
#define __NR_statmount 457
#define __NR_listmount 458
#define __NR_lsm_get_self_attr 459
#define __NR_lsm_set_self_attr 460
#define __NR_lsm_list_modules 461
#define __NR_mseal 462
#define __NR_setxattrat 463
#define __NR_getxattrat 464
#define __NR_listxattrat 465
#define __NR_removexattrat 466
#define __NR_open_tree_attr 467
#define __NR_file_getattr 468
#define __NR_file_setattr 469
#define __NR_listns 470
#define __NR_sysriscv __NR_arch_specific_syscall
#define __NR_riscv_flush_icache (__NR_sysriscv + 15)
#define __NR_riscv_hwprobe (__NR_sysriscv + 14)
+19
View File
@@ -359,6 +359,7 @@
#define __NR_process_madvise 440
#define __NR_epoll_pwait2 441
#define __NR_mount_setattr 442
#define __NR_quotactl_fd 443
#define __NR_landlock_create_ruleset 444
#define __NR_landlock_add_rule 445
#define __NR_landlock_restrict_self 446
@@ -368,4 +369,22 @@
#define __NR_set_mempolicy_home_node 450
#define __NR_cachestat 451
#define __NR_fchmodat2 452
#define __NR_map_shadow_stack 453
#define __NR_futex_wake 454
#define __NR_futex_wait 455
#define __NR_futex_requeue 456
#define __NR_statmount 457
#define __NR_listmount 458
#define __NR_lsm_get_self_attr 459
#define __NR_lsm_set_self_attr 460
#define __NR_lsm_list_modules 461
#define __NR_mseal 462
#define __NR_setxattrat 463
#define __NR_getxattrat 464
#define __NR_listxattrat 465
#define __NR_removexattrat 466
#define __NR_open_tree_attr 467
#define __NR_file_getattr 468
#define __NR_file_setattr 469
#define __NR_listns 470
+20
View File
@@ -357,6 +357,7 @@
#define __NR_pkey_alloc 385
#define __NR_pkey_free 386
#define __NR_rseq 387
#define __NR_sync_file_range2 388
#define __NR_semget 393
#define __NR_semctl 394
#define __NR_shmget 395
@@ -406,6 +407,7 @@
#define __NR_process_madvise 440
#define __NR_epoll_pwait2 441
#define __NR_mount_setattr 442
#define __NR_quotactl_fd 443
#define __NR_landlock_create_ruleset 444
#define __NR_landlock_add_rule 445
#define __NR_landlock_restrict_self 446
@@ -414,4 +416,22 @@
#define __NR_set_mempolicy_home_node 450
#define __NR_cachestat 451
#define __NR_fchmodat2 452
#define __NR_map_shadow_stack 453
#define __NR_futex_wake 454
#define __NR_futex_wait 455
#define __NR_futex_requeue 456
#define __NR_statmount 457
#define __NR_listmount 458
#define __NR_lsm_get_self_attr 459
#define __NR_lsm_set_self_attr 460
#define __NR_lsm_list_modules 461
#define __NR_mseal 462
#define __NR_setxattrat 463
#define __NR_getxattrat 464
#define __NR_listxattrat 465
#define __NR_removexattrat 466
#define __NR_open_tree_attr 467
#define __NR_file_getattr 468
#define __NR_file_setattr 469
#define __NR_listns 470
+21
View File
@@ -286,6 +286,8 @@
#define __NR_statx (0x40000000 + 332)
#define __NR_io_pgetevents (0x40000000 + 333)
#define __NR_rseq (0x40000000 + 334)
#define __NR_uretprobe (0x40000000 + 335)
#define __NR_uprobe (0x40000000 + 336)
#define __NR_pidfd_send_signal (0x40000000 + 424)
#define __NR_io_uring_setup (0x40000000 + 425)
#define __NR_io_uring_enter (0x40000000 + 426)
@@ -305,6 +307,7 @@
#define __NR_process_madvise (0x40000000 + 440)
#define __NR_epoll_pwait2 (0x40000000 + 441)
#define __NR_mount_setattr (0x40000000 + 442)
#define __NR_quotactl_fd (0x40000000 + 443)
#define __NR_landlock_create_ruleset (0x40000000 + 444)
#define __NR_landlock_add_rule (0x40000000 + 445)
#define __NR_landlock_restrict_self (0x40000000 + 446)
@@ -314,6 +317,24 @@
#define __NR_set_mempolicy_home_node (0x40000000 + 450)
#define __NR_cachestat (0x40000000 + 451)
#define __NR_fchmodat2 (0x40000000 + 452)
#define __NR_map_shadow_stack (0x40000000 + 453)
#define __NR_futex_wake (0x40000000 + 454)
#define __NR_futex_wait (0x40000000 + 455)
#define __NR_futex_requeue (0x40000000 + 456)
#define __NR_statmount (0x40000000 + 457)
#define __NR_listmount (0x40000000 + 458)
#define __NR_lsm_get_self_attr (0x40000000 + 459)
#define __NR_lsm_set_self_attr (0x40000000 + 460)
#define __NR_lsm_list_modules (0x40000000 + 461)
#define __NR_mseal (0x40000000 + 462)
#define __NR_setxattrat (0x40000000 + 463)
#define __NR_getxattrat (0x40000000 + 464)
#define __NR_listxattrat (0x40000000 + 465)
#define __NR_removexattrat (0x40000000 + 466)
#define __NR_open_tree_attr (0x40000000 + 467)
#define __NR_file_getattr (0x40000000 + 468)
#define __NR_file_setattr (0x40000000 + 469)
#define __NR_listns (0x40000000 + 470)
#define __NR_rt_sigaction (0x40000000 + 512)
+21
View File
@@ -333,6 +333,8 @@
#define __NR_statx 332
#define __NR_io_pgetevents 333
#define __NR_rseq 334
#define __NR_uretprobe 335
#define __NR_uprobe 336
#define __NR_pidfd_send_signal 424
#define __NR_io_uring_setup 425
#define __NR_io_uring_enter 426
@@ -352,6 +354,7 @@
#define __NR_process_madvise 440
#define __NR_epoll_pwait2 441
#define __NR_mount_setattr 442
#define __NR_quotactl_fd 443
#define __NR_landlock_create_ruleset 444
#define __NR_landlock_add_rule 445
#define __NR_landlock_restrict_self 446
@@ -361,4 +364,22 @@
#define __NR_set_mempolicy_home_node 450
#define __NR_cachestat 451
#define __NR_fchmodat2 452
#define __NR_map_shadow_stack 453
#define __NR_futex_wake 454
#define __NR_futex_wait 455
#define __NR_futex_requeue 456
#define __NR_statmount 457
#define __NR_listmount 458
#define __NR_lsm_get_self_attr 459
#define __NR_lsm_set_self_attr 460
#define __NR_lsm_list_modules 461
#define __NR_mseal 462
#define __NR_setxattrat 463
#define __NR_getxattrat 464
#define __NR_listxattrat 465
#define __NR_removexattrat 466
#define __NR_open_tree_attr 467
#define __NR_file_getattr 468
#define __NR_file_setattr 469
#define __NR_listns 470
+28
View File
@@ -712,6 +712,8 @@ typedef struct {
#define NT_LOONGARCH_LSX 0xa02
#define NT_LOONGARCH_LASX 0xa03
#define NT_LOONGARCH_LBT 0xa04
#define NT_LOONGARCH_HW_BREAK 0xa05
#define NT_LOONGARCH_HW_WATCH 0xa06
@@ -3408,6 +3410,32 @@ enum
#define R_LARCH_TLS_GD_HI20 98
#define R_LARCH_32_PCREL 99
#define R_LARCH_RELAX 100
#define R_LARCH_DELETE 101
#define R_LARCH_ALIGN 102
#define R_LARCH_PCREL20_S2 103
#define R_LARCH_CFA 104
#define R_LARCH_ADD6 105
#define R_LARCH_SUB6 106
#define R_LARCH_ADD_ULEB128 107
#define R_LARCH_SUB_ULEB128 108
#define R_LARCH_64_PCREL 109
#define R_LARCH_CALL36 110
#define R_LARCH_TLS_DESC_PC_HI20 111
#define R_LARCH_TLS_DESC_PC_LO12 112
#define R_LARCH_TLS_DESC64_PC_LO20 113
#define R_LARCH_TLS_DESC64_PC_HI12 114
#define R_LARCH_TLS_DESC_HI20 115
#define R_LARCH_TLS_DESC_LO12 116
#define R_LARCH_TLS_DESC64_LO20 117
#define R_LARCH_TLS_DESC64_HI12 118
#define R_LARCH_TLS_DESC_LD 119
#define R_LARCH_TLS_DESC_CALL 120
#define R_LARCH_TLS_LE_HI20_R 121
#define R_LARCH_TLS_LE_ADD_R 122
#define R_LARCH_TLS_LE_LO12_R 123
#define R_LARCH_TLS_LD_PCREL20_S2 124
#define R_LARCH_TLS_GD_PCREL20_S2 125
#define R_LARCH_TLS_DESC_PCREL20_S2 126
#ifdef __cplusplus
}
+4
View File
@@ -95,6 +95,10 @@ extern "C" {
#define MADV_KEEPONFORK 19
#define MADV_COLD 20
#define MADV_PAGEOUT 21
#define MADV_POPULATE_READ 22
#define MADV_POPULATE_WRITE 23
#define MADV_DONTNEED_LOCKED 24
#define MADV_COLLAPSE 25
#define MADV_HWPOISON 100
#define MADV_SOFT_OFFLINE 101
#endif
+3
View File
@@ -0,0 +1,3 @@
#ifdef __loongarch_soft_float
#include "../fenv.c"
#endif
+26 -2
View File
@@ -40,6 +40,24 @@ static int checkver(Verdef *def, int vsym, const char *vername, char *strings)
#define OK_TYPES (1<<STT_NOTYPE | 1<<STT_OBJECT | 1<<STT_FUNC | 1<<STT_COMMON)
#define OK_BINDS (1<<STB_GLOBAL | 1<<STB_WEAK | 1<<STB_GNU_UNIQUE)
static size_t count_syms_gnu(uint32_t *gh)
{
size_t nsym, i;
uint32_t *buckets = gh + 4 + (gh[2]*sizeof(size_t)/4);
uint32_t *hashval;
for (i = nsym = 0; i < gh[0]; i++) {
if (buckets[i] > nsym)
nsym = buckets[i];
}
if (nsym) {
hashval = buckets + gh[0] + (nsym - gh[1]);
do nsym++;
while (!(*hashval++ & 1));
}
return nsym;
}
void *__vdsosym(const char *vername, const char *name)
{
size_t i;
@@ -60,6 +78,7 @@ void *__vdsosym(const char *vername, const char *name)
char *strings = 0;
Sym *syms = 0;
Elf_Symndx *hashtab = 0;
uint32_t *ghashtab = 0;
uint16_t *versym = 0;
Verdef *verdef = 0;
@@ -69,15 +88,20 @@ void *__vdsosym(const char *vername, const char *name)
case DT_STRTAB: strings = p; break;
case DT_SYMTAB: syms = p; break;
case DT_HASH: hashtab = p; break;
case DT_GNU_HASH: ghashtab = p; break;
case DT_VERSYM: versym = p; break;
case DT_VERDEF: verdef = p; break;
}
}
if (!strings || !syms || !hashtab) return 0;
if (!strings || !syms) return 0;
if (!verdef) versym = 0;
size_t nsym = 0;
for (i=0; i<hashtab[1]; i++) {
if (hashtab) nsym = hashtab[1];
else if (ghashtab) nsym = count_syms_gnu(ghashtab);
for (i=0; i<nsym; i++) {
if (!(1<<(syms[i].st_info&0xf) & OK_TYPES)) continue;
if (!(1<<(syms[i].st_info>>4) & OK_BINDS)) continue;
if (!syms[i].st_shndx) continue;
+2 -2
View File
@@ -62,8 +62,8 @@ __attribute__((__visibility__("hidden")))
extern int __malloc_lock[1];
#define LOCK_OBJ_DEF \
int __malloc_lock[1]; \
void __malloc_atfork(int who) { malloc_atfork(who); }
void __malloc_atfork(int who) { malloc_atfork(who); } \
int __malloc_lock[1]
static inline void rdlock()
{
+2 -2
View File
@@ -13,8 +13,8 @@
/* getifaddrs() reports hardware addresses with PF_PACKET that implies
* struct sockaddr_ll. But e.g. Infiniband socket address length is
* longer than sockaddr_ll.ssl_addr[8] can hold. Use this hack struct
* to extend ssl_addr - callers should be able to still use it. */
* longer than sockaddr_ll.sll_addr[8] can hold. Use this hack struct
* to extend sll_addr - callers should be able to still use it. */
struct sockaddr_ll_hack {
unsigned short sll_family, sll_protocol;
int sll_ifindex;
+11 -1
View File
@@ -71,6 +71,10 @@ int __getgr_a(const char *name, gid_t gid, struct group *gr, char **buf, size_t
goto cleanup_f;
}
if (groupbuf[GRMEMCNT] > (size_t)(INT32_MAX-1)) {
rv = ENOMEM;
goto cleanup_f;
}
if (groupbuf[GRNAMELEN] > SIZE_MAX - groupbuf[GRPASSWDLEN]) {
rv = ENOMEM;
goto cleanup_f;
@@ -127,7 +131,13 @@ int __getgr_a(const char *name, gid_t gid, struct group *gr, char **buf, size_t
if (groupbuf[GRMEMCNT]) {
mem[0][0] = *buf + groupbuf[GRNAMELEN] + groupbuf[GRPASSWDLEN];
for (ptr = mem[0][0], i = 0; ptr != mem[0][0]+grlist_len; ptr++)
if (!*ptr) mem[0][++i] = ptr+1;
if (!*ptr)
if (i<groupbuf[GRMEMCNT]) {
mem[0][++i] = ptr+1;
} else {
rv = EIO;
goto cleanup_f;
}
mem[0][i] = 0;
if (i != groupbuf[GRMEMCNT]) {