Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ This gives us the following advantages:

This repository contains some blobs like `libc.so`.
The source:
- for `x86_64` they are from Ubuntu 20.04 image;
- for `x86_64` they are from Ubuntu 24.04 image;
- for `aarch64` they are from [developer.arm.com](https://developer.arm.com/-/media/Files/downloads/gnu-a/8.3-2019.03/binrel/gcc-arm-8.3-2019.03-x86_64-aarch64-linux-gnu.tar.xz?revision=2e88a73f-d233-4f96-b1f4-d8b36e9bb0b9&la=en)

- for `s390x` it is extracted from Docker image:
Expand Down
Binary file not shown.
Binary file not shown.
Binary file modified linux-x86_64/x86_64-linux-gnu/libc/lib64/Scrt1.o
100755 → 100644
Binary file not shown.
Binary file not shown.
Binary file removed linux-x86_64/x86_64-linux-gnu/libc/lib64/libc.so.6
Binary file not shown.
Binary file modified linux-x86_64/x86_64-linux-gnu/libc/lib64/libdl.so.2
100755 → 100644
Binary file not shown.
Binary file modified linux-x86_64/x86_64-linux-gnu/libc/lib64/libm.so.6
100755 → 100644
Binary file not shown.
Binary file modified linux-x86_64/x86_64-linux-gnu/libc/lib64/libpthread.so.0
100755 → 100644
Binary file not shown.
Binary file modified linux-x86_64/x86_64-linux-gnu/libc/lib64/libresolv.so.2
100755 → 100644
Binary file not shown.
Binary file modified linux-x86_64/x86_64-linux-gnu/libc/lib64/librt.so.1
100755 → 100644
Binary file not shown.
6 changes: 3 additions & 3 deletions linux-x86_64/x86_64-linux-gnu/libc/usr/include/alloca.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (C) 1992-2018 Free Software Foundation, Inc.
/* Copyright (C) 1992-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library.

The GNU C Library is free software; you can redistribute it and/or
Expand All @@ -13,7 +13,7 @@

You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
<https://www.gnu.org/licenses/>. */

#ifndef _ALLOCA_H
#define _ALLOCA_H 1
Expand All @@ -25,7 +25,7 @@

__BEGIN_DECLS

/* Remove any previous definitions. */
/* Remove any previous definition. */
#undef alloca

/* Allocate a block that will be freed when the calling function exits. */
Expand Down
4 changes: 2 additions & 2 deletions linux-x86_64/x86_64-linux-gnu/libc/usr/include/argz.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Routines for dealing with '\0' separated arg vectors.
Copyright (C) 1995-2018 Free Software Foundation, Inc.
Copyright (C) 1995-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library.

The GNU C Library is free software; you can redistribute it and/or
Expand All @@ -14,7 +14,7 @@

You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
<https://www.gnu.org/licenses/>. */

#ifndef _ARGZ_H
#define _ARGZ_H 1
Expand Down
9 changes: 5 additions & 4 deletions linux-x86_64/x86_64-linux-gnu/libc/usr/include/arpa/inet.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (C) 1997-2018 Free Software Foundation, Inc.
/* Copyright (C) 1997-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library.

The GNU C Library is free software; you can redistribute it and/or
Expand All @@ -13,7 +13,7 @@

You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
<https://www.gnu.org/licenses/>. */

#ifndef _ARPA_INET_H
#define _ARPA_INET_H 1
Expand Down Expand Up @@ -74,10 +74,11 @@ extern int inet_aton (const char *__cp, struct in_addr *__inp) __THROW;

/* Format a network number NET into presentation format and place result
in buffer starting at BUF with length of LEN bytes. */
extern char *inet_neta (in_addr_t __net, char *__buf, size_t __len) __THROW;
extern char *inet_neta (in_addr_t __net, char *__buf, size_t __len) __THROW
__attribute_deprecated_msg__ ("Use inet_ntop instead");

/* Convert network number for interface type AF in buffer starting at
CP to presentation format. The result will specifiy BITS bits of
CP to presentation format. The result will specify BITS bits of
the number. */
extern char *inet_net_ntop (int __af, const void *__cp, int __bits,
char *__buf, size_t __len) __THROW;
Expand Down
33 changes: 24 additions & 9 deletions linux-x86_64/x86_64-linux-gnu/libc/usr/include/arpa/nameser.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@
#include <sys/types.h>
#include <stdint.h>

#ifdef _LIBC
# define __NAMESER_DEPRECATED
#else
# define __NAMESER_DEPRECATED __attribute_deprecated__
#endif

/*
* Define constants based on RFC 883, RFC 1034, RFC 1035
*/
Expand Down Expand Up @@ -401,14 +407,18 @@ int ns_skiprr (const unsigned char *, const unsigned char *,
int ns_parserr (ns_msg *, ns_sect, int, ns_rr *) __THROW;
int ns_sprintrr (const ns_msg *, const ns_rr *,
const char *, const char *, char *, size_t)
__THROW;
__THROW __NAMESER_DEPRECATED;
int ns_sprintrrf (const unsigned char *, size_t, const char *,
ns_class, ns_type, unsigned long,
const unsigned char *, size_t, const char *,
const char *, char *, size_t) __THROW;
int ns_format_ttl (unsigned long, char *, size_t) __THROW;
int ns_parse_ttl (const char *, unsigned long *) __THROW;
uint32_t ns_datetosecs (const char *, int *) __THROW;
const char *, char *, size_t)
__THROW __NAMESER_DEPRECATED;
int ns_format_ttl (unsigned long, char *, size_t)
__THROW __NAMESER_DEPRECATED;
int ns_parse_ttl (const char *, unsigned long *)
__THROW __NAMESER_DEPRECATED;
uint32_t ns_datetosecs (const char *, int *)
__THROW __NAMESER_DEPRECATED;
int ns_name_ntol (const unsigned char *, unsigned char *, size_t)
__THROW;
int ns_name_ntop (const unsigned char *, char *, size_t) __THROW;
Expand All @@ -431,10 +441,15 @@ int ns_name_skip (const unsigned char **, const unsigned char *)
void ns_name_rollback (const unsigned char *,
const unsigned char **,
const unsigned char **) __THROW;
int ns_samedomain (const char *, const char *) __THROW;
int ns_subdomain (const char *, const char *) __THROW;
int ns_makecanon (const char *, char *, size_t) __THROW;
int ns_samename (const char *, const char *) __THROW;

int ns_samedomain (const char *, const char *) __THROW
__NAMESER_DEPRECATED;
int ns_subdomain (const char *, const char *) __THROW
__NAMESER_DEPRECATED;
int ns_makecanon (const char *, char *, size_t) __THROW
__NAMESER_DEPRECATED;
int ns_samename (const char *, const char *) __THROW
__NAMESER_DEPRECATED;
__END_DECLS

#include <arpa/nameser_compat.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ typedef struct {
/* fields in third byte */
unsigned qr: 1; /*%< response flag */
unsigned opcode: 4; /*%< purpose of message */
unsigned aa: 1; /*%< authoritive answer */
unsigned aa: 1; /*%< authoritative answer */
unsigned tc: 1; /*%< truncated message */
unsigned rd: 1; /*%< recursion desired */
/* fields in fourth byte */
Expand All @@ -58,7 +58,7 @@ typedef struct {
/* fields in third byte */
unsigned rd :1; /*%< recursion desired */
unsigned tc :1; /*%< truncated message */
unsigned aa :1; /*%< authoritive answer */
unsigned aa :1; /*%< authoritative answer */
unsigned opcode :4; /*%< purpose of message */
unsigned qr :1; /*%< response flag */
/* fields in fourth byte */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,26 @@
#ifndef __ASM_GENERIC_BITS_PER_LONG
#define __ASM_GENERIC_BITS_PER_LONG

#ifndef __BITS_PER_LONG
/*
* In order to keep safe and avoid regression, only unify uapi
* bitsperlong.h for some archs which are using newer toolchains
* that have the definitions of __CHAR_BIT__ and __SIZEOF_LONG__.
* See the following link for more info:
* https://lore.kernel.org/linux-arch/b9624545-2c80-49a1-ac3c-39264a591f7b@app.fastmail.com/
*/
#if defined(__CHAR_BIT__) && defined(__SIZEOF_LONG__)
#define __BITS_PER_LONG (__CHAR_BIT__ * __SIZEOF_LONG__)
#else
/*
* There seems to be no way of detecting this automatically from user
* space, so 64 bit architectures should override this in their
* bitsperlong.h. In particular, an architecture that supports
* both 32 and 64 bit user space must not rely on CONFIG_64BIT
* to decide it, but rather check a compiler provided macro.
*/
#ifndef __BITS_PER_LONG
#define __BITS_PER_LONG 32
#endif
#endif

#endif /* __ASM_GENERIC_BITS_PER_LONG */
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,18 @@
#define HUGETLB_FLAG_ENCODE_SHIFT 26
#define HUGETLB_FLAG_ENCODE_MASK 0x3f

#define HUGETLB_FLAG_ENCODE_64KB (16 << HUGETLB_FLAG_ENCODE_SHIFT)
#define HUGETLB_FLAG_ENCODE_512KB (19 << HUGETLB_FLAG_ENCODE_SHIFT)
#define HUGETLB_FLAG_ENCODE_1MB (20 << HUGETLB_FLAG_ENCODE_SHIFT)
#define HUGETLB_FLAG_ENCODE_2MB (21 << HUGETLB_FLAG_ENCODE_SHIFT)
#define HUGETLB_FLAG_ENCODE_8MB (23 << HUGETLB_FLAG_ENCODE_SHIFT)
#define HUGETLB_FLAG_ENCODE_16MB (24 << HUGETLB_FLAG_ENCODE_SHIFT)
#define HUGETLB_FLAG_ENCODE_256MB (28 << HUGETLB_FLAG_ENCODE_SHIFT)
#define HUGETLB_FLAG_ENCODE_1GB (30 << HUGETLB_FLAG_ENCODE_SHIFT)
#define HUGETLB_FLAG_ENCODE_2GB (31 << HUGETLB_FLAG_ENCODE_SHIFT)
#define HUGETLB_FLAG_ENCODE_16GB (34 << HUGETLB_FLAG_ENCODE_SHIFT)
#define HUGETLB_FLAG_ENCODE_16KB (14U << HUGETLB_FLAG_ENCODE_SHIFT)
#define HUGETLB_FLAG_ENCODE_64KB (16U << HUGETLB_FLAG_ENCODE_SHIFT)
#define HUGETLB_FLAG_ENCODE_512KB (19U << HUGETLB_FLAG_ENCODE_SHIFT)
#define HUGETLB_FLAG_ENCODE_1MB (20U << HUGETLB_FLAG_ENCODE_SHIFT)
#define HUGETLB_FLAG_ENCODE_2MB (21U << HUGETLB_FLAG_ENCODE_SHIFT)
#define HUGETLB_FLAG_ENCODE_8MB (23U << HUGETLB_FLAG_ENCODE_SHIFT)
#define HUGETLB_FLAG_ENCODE_16MB (24U << HUGETLB_FLAG_ENCODE_SHIFT)
#define HUGETLB_FLAG_ENCODE_32MB (25U << HUGETLB_FLAG_ENCODE_SHIFT)
#define HUGETLB_FLAG_ENCODE_256MB (28U << HUGETLB_FLAG_ENCODE_SHIFT)
#define HUGETLB_FLAG_ENCODE_512MB (29U << HUGETLB_FLAG_ENCODE_SHIFT)
#define HUGETLB_FLAG_ENCODE_1GB (30U << HUGETLB_FLAG_ENCODE_SHIFT)
#define HUGETLB_FLAG_ENCODE_2GB (31U << HUGETLB_FLAG_ENCODE_SHIFT)
#define HUGETLB_FLAG_ENCODE_16GB (34U << HUGETLB_FLAG_ENCODE_SHIFT)

#endif /* _ASM_GENERIC_HUGETLB_ENCODE_H_ */
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@
#define TIOCGPTLCK _IOR('T', 0x39, int) /* Get Pty lock state */
#define TIOCGEXCL _IOR('T', 0x40, int) /* Get exclusive mode state */
#define TIOCGPTPEER _IO('T', 0x41) /* Safely open the slave */
#define TIOCGISO7816 _IOR('T', 0x42, struct serial_iso7816)
#define TIOCSISO7816 _IOWR('T', 0x43, struct serial_iso7816)

#define FIONCLEX 0x5450
#define FIOCLEX 0x5451
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,27 @@
#define PROT_WRITE 0x2 /* page can be written */
#define PROT_EXEC 0x4 /* page can be executed */
#define PROT_SEM 0x8 /* page may be used for atomic ops */
/* 0x10 reserved for arch-specific use */
/* 0x20 reserved for arch-specific use */
#define PROT_NONE 0x0 /* page can not be accessed */
#define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */
#define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */

#define MAP_SHARED 0x01 /* Share changes */
#define MAP_PRIVATE 0x02 /* Changes are private */
#define MAP_SHARED_VALIDATE 0x03 /* share + validate extension flags */
/* 0x01 - 0x03 are defined in linux/mman.h */
#define MAP_TYPE 0x0f /* Mask for type of mapping */
#define MAP_FIXED 0x10 /* Interpret addr exactly */
#define MAP_ANONYMOUS 0x20 /* don't use a file */
#ifdef CONFIG_MMAP_ALLOW_UNINITIALIZED
# define MAP_UNINITIALIZED 0x4000000 /* For anonymous mmap, memory could be uninitialized */
#else
# define MAP_UNINITIALIZED 0x0 /* Don't support this flag */
#endif

/* 0x0100 - 0x4000 flags are defined in asm-generic/mman.h */
#define MAP_POPULATE 0x008000 /* populate (prefault) pagetables */
#define MAP_NONBLOCK 0x010000 /* do not block on IO */
#define MAP_STACK 0x020000 /* give out an address that is best suited for process/thread stacks */
#define MAP_HUGETLB 0x040000 /* create a huge page mapping */
#define MAP_SYNC 0x080000 /* perform synchronous page faults for the mapping */
#define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED which doesn't unmap underlying mapping */

#define MAP_UNINITIALIZED 0x4000000 /* For anonymous mmap, memory could be
* uninitialized */

/*
* Flags for mlock
Expand Down Expand Up @@ -69,6 +75,10 @@
#define MADV_POPULATE_READ 22 /* populate (prefault) page tables readable */
#define MADV_POPULATE_WRITE 23 /* populate (prefault) page tables writable */

#define MADV_DONTNEED_LOCKED 24 /* like DONTNEED, but drop locked pages too */

#define MADV_COLLAPSE 25 /* Synchronous hugepage collapse */

/* compatibility flags */
#define MAP_FILE 0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@
#define MAP_EXECUTABLE 0x1000 /* mark it as an executable */
#define MAP_LOCKED 0x2000 /* pages are locked */
#define MAP_NORESERVE 0x4000 /* don't check for reservations */
#define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */
#define MAP_NONBLOCK 0x10000 /* do not block on IO */
#define MAP_STACK 0x20000 /* give out an address that is best suited for process/thread stacks */
#define MAP_HUGETLB 0x40000 /* create a huge page mapping */
#define MAP_SYNC 0x80000 /* perform synchronous page faults for the mapping */

/* Bits [26:31] are reserved, see mman-common.h for MAP_HUGETLB usage */
/*
* Bits [26:31] are reserved, see asm-generic/hugetlb_encode.h
* for MAP_HUGETLB usage
*/

#define MCL_CURRENT 1 /* lock all current mappings */
#define MCL_FUTURE 2 /* lock all future mappings */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ typedef struct {
*/
typedef __kernel_long_t __kernel_off_t;
typedef long long __kernel_loff_t;
typedef __kernel_long_t __kernel_old_time_t;
typedef __kernel_long_t __kernel_time_t;
typedef long long __kernel_time64_t;
typedef __kernel_long_t __kernel_clock_t;
typedef int __kernel_timer_t;
typedef int __kernel_clockid_t;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#ifndef __ASM_GENERIC_SOCKET_H
#define __ASM_GENERIC_SOCKET_H

#include <linux/posix_types.h>
#include <asm/sockios.h>

/* For setsockopt(2) */
Expand Down Expand Up @@ -29,8 +30,8 @@
#define SO_PEERCRED 17
#define SO_RCVLOWAT 18
#define SO_SNDLOWAT 19
#define SO_RCVTIMEO 20
#define SO_SNDTIMEO 21
#define SO_RCVTIMEO_OLD 20
#define SO_SNDTIMEO_OLD 21
#endif

/* Security levels - as per NRL IPv6 - don't actually do anything */
Expand All @@ -46,21 +47,14 @@
#define SO_GET_FILTER SO_ATTACH_FILTER

#define SO_PEERNAME 28
#define SO_TIMESTAMP 29
#define SCM_TIMESTAMP SO_TIMESTAMP

#define SO_ACCEPTCONN 30

#define SO_PEERSEC 31
#define SO_PASSSEC 34
#define SO_TIMESTAMPNS 35
#define SCM_TIMESTAMPNS SO_TIMESTAMPNS

#define SO_MARK 36

#define SO_TIMESTAMPING 37
#define SCM_TIMESTAMPING SO_TIMESTAMPING

#define SO_PROTOCOL 38
#define SO_DOMAIN 39

Expand Down Expand Up @@ -107,4 +101,61 @@

#define SO_ZEROCOPY 60

#define SO_TXTIME 61
#define SCM_TXTIME SO_TXTIME

#define SO_BINDTOIFINDEX 62

#define SO_TIMESTAMP_OLD 29
#define SO_TIMESTAMPNS_OLD 35
#define SO_TIMESTAMPING_OLD 37

#define SO_TIMESTAMP_NEW 63
#define SO_TIMESTAMPNS_NEW 64
#define SO_TIMESTAMPING_NEW 65

#define SO_RCVTIMEO_NEW 66
#define SO_SNDTIMEO_NEW 67

#define SO_DETACH_REUSEPORT_BPF 68

#define SO_PREFER_BUSY_POLL 69
#define SO_BUSY_POLL_BUDGET 70

#define SO_NETNS_COOKIE 71

#define SO_BUF_LOCK 72

#define SO_RESERVE_MEM 73

#define SO_TXREHASH 74

#define SO_RCVMARK 75

#define SO_PASSPIDFD 76
#define SO_PEERPIDFD 77


#if __BITS_PER_LONG == 64 || (defined(__x86_64__) && defined(__ILP32__))
/* on 64-bit and x32, avoid the ?: operator */
#define SO_TIMESTAMP SO_TIMESTAMP_OLD
#define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD
#define SO_TIMESTAMPING SO_TIMESTAMPING_OLD

#define SO_RCVTIMEO SO_RCVTIMEO_OLD
#define SO_SNDTIMEO SO_SNDTIMEO_OLD
#else
#define SO_TIMESTAMP (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_TIMESTAMP_OLD : SO_TIMESTAMP_NEW)
#define SO_TIMESTAMPNS (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_TIMESTAMPNS_OLD : SO_TIMESTAMPNS_NEW)
#define SO_TIMESTAMPING (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_TIMESTAMPING_OLD : SO_TIMESTAMPING_NEW)

#define SO_RCVTIMEO (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_RCVTIMEO_OLD : SO_RCVTIMEO_NEW)
#define SO_SNDTIMEO (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_SNDTIMEO_OLD : SO_SNDTIMEO_NEW)
#endif

#define SCM_TIMESTAMP SO_TIMESTAMP
#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
#define SCM_TIMESTAMPING SO_TIMESTAMPING


#endif /* __ASM_GENERIC_SOCKET_H */
Loading