ladybird/Userland/Libraries/LibC
Dan Klishch 982799f7a0 LibC+LibELF: Pass information from linker via magic lookup
This works by defining a set of weak symbols in dynamic linker whose
value would be provided by it. This has the same effect as preloading
library that magically knows right addresses of functions shared between
dynamic linker and LibC.

We were previously passing the same information by rewriting values
based on hardcoded library name, so the new approach seems a little
nicer to me.
2024-01-24 22:17:49 -07:00
..
arch LibC: Separate arch dependent fenv functions 2024-01-22 20:06:09 -07:00
arpa LibC: Add most of the "header may make visible" dependencies from POSIX 2023-07-19 00:19:35 -06:00
bits Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
net LibC: Add missing sys/cdefs.h include 2022-08-23 19:07:12 +01:00
netinet Kernel/Net: Implement TCP_NODELAY 2023-11-08 09:31:54 +01:00
sys Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
alloca.h
assert.cpp Userland: Always call syscall(SC_prctl, ...) with 4 arguments 2023-09-02 18:22:07 +02:00
assert.h Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
byteswap.h Everywhere: Fix order of includes and #pragma once 2022-09-18 18:30:05 -07:00
CMakeLists.txt LibC: Separate arch dependent fenv functions 2024-01-22 20:06:09 -07:00
complex.h LibC: Fix duplicated function symbols 2023-07-29 16:51:58 -06:00
crt0_shared.cpp Everywhere: Remove unused includes of LibC/stdlib.h 2023-01-02 20:27:20 -05:00
crt0.cpp Userland+Tests: Add initial riscv64 support 2023-11-10 10:30:08 -07:00
ctype.cpp LibC: Align _ctype_ to newlib's implementation 2022-06-30 12:34:16 +01:00
ctype.h LibC: Align _ctype_ to newlib's implementation 2022-06-30 12:34:16 +01:00
cxxabi.cpp Everywhere: Remove "LibC/" includes, add lint-rule against it 2023-01-07 10:01:37 -07:00
dirent.cpp Everywhere: Remove unused includes of AK/Format.h 2023-01-02 20:27:20 -05:00
dirent.h LibC: Add missing sys/cdefs.h include 2022-08-23 19:07:12 +01:00
dlfcn.cpp LibC+LibELF: Pass information from linker via magic lookup 2024-01-24 22:17:49 -07:00
dlfcn.h Userland: Fix wrong signature of dladdr 2023-05-05 02:19:05 +02:00
elf.h LibC+LibELF: Move ELF definitions from LibC to LibELF 2023-06-27 12:40:38 +02:00
endian.h
errno_codes.h LibC: Add missing macro definitions for errno codes 2022-05-08 13:04:32 -07:00
errno.h LibC: Implement errno via a __errno_location() function 2022-04-21 11:49:48 +02:00
fcntl.cpp Kernel+LibC: Pass 64-bit integers in syscalls by value 2023-08-12 01:14:26 +02:00
fcntl.h LibC: Add most of the "header may make visible" dependencies from POSIX 2023-07-19 00:19:35 -06:00
fd_set.h Kernel+LibC: Move the FD_SETSIZE declaration to API/POSIX/select.h file 2023-03-01 19:36:53 -07:00
fenv.cpp LibC: Separate arch dependent fenv functions 2024-01-22 20:06:09 -07:00
fenv.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
float.h LibC+LibDl: Declare functions taking no arguments as taking void 2022-01-08 19:22:00 +01:00
fnmatch.cpp
fnmatch.h LibC: Add missing sys/cdefs.h include 2022-08-23 19:07:12 +01:00
getopt.cpp LibC: Correctly reset the getopt state on optind = 1 2023-03-12 22:09:09 +01:00
getopt.h LibC: Make getopt available from getopt.h 2023-07-19 00:19:35 -06:00
getsubopt.cpp Everywhere: Remove unused includes of LibC/stdlib.h 2023-01-02 20:27:20 -05:00
glob.cpp LibC: Add stubs for glob and globfree 2022-07-08 22:27:38 +00:00
glob.h LibC: Add missing sys/cdefs.h include 2022-08-23 19:07:12 +01:00
grp.cpp LibC: Implement getgrgid_r() and getgrnam_r() 2024-01-06 04:59:50 -07:00
grp.h LibC: Implement getgrgid_r() and getgrnam_r() 2024-01-06 04:59:50 -07:00
ifaddrs.cpp Everywhere: Remove "LibC/" includes, add lint-rule against it 2023-01-07 10:01:37 -07:00
ifaddrs.h Kernel+LibC: Stub out getifaddrs() and freeifaddrs() 2021-12-22 00:02:36 -08:00
inttypes.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
inttypes.h Kernel+Userland: Remove uses of the __i386__ compiler macro 2022-12-28 11:53:41 +01:00
ioctl.cpp
langinfo.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
langinfo.h LibC: Add most of the "header may make visible" dependencies from POSIX 2023-07-19 00:19:35 -06:00
libcinit.cpp LibC+LibELF: Pass information from linker via magic lookup 2024-01-24 22:17:49 -07:00
libgen.cpp
libgen.h
limits.h LibC: Set (U)LONG_WIDTH correctly for 64-bit 2023-09-03 09:18:22 +02:00
link.cpp LibC+LibELF: Pass information from linker via magic lookup 2024-01-24 22:17:49 -07:00
link.h Everywhere: Replace ElfW(type) macro usage with Elf_type 2023-12-01 10:02:39 +02:00
locale.cpp LibC: Allow detection of supported locales through setlocale 2022-09-29 09:02:17 -04:00
locale.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
malloc.cpp Kernel+Libraries: Move defines and types from sys/auxv.h to Kernel/API 2023-01-21 10:43:59 -07:00
mallocdefs.h LibC: Increase alignment for malloc() BigAllocationBlocks to 16 bytes 2022-03-02 11:40:37 +01:00
math.cpp Userland+Tests: Add initial riscv64 support 2023-11-10 10:30:08 -07:00
math.h LibM: Move the math standard library to LibC 2022-09-16 16:09:19 +00:00
memory.h
mntent.cpp LibC: Remove TODO() macros to not break mc port 2022-01-13 18:46:22 +01:00
mntent.h LibC: Add mntent stub functions 2022-01-07 18:38:32 +01:00
net.cpp LibC: Implement if_indextoname and if_nametoindex 2023-04-14 12:29:03 +01:00
netdb.cpp LibC: Set sin_port in network order in getaddrinfo results 2023-12-24 22:22:58 +01:00
netdb.h LibC: Implement gethostbyname_r() 2023-08-29 11:04:48 +02:00
nl_types.h
paths.h Ports: Add lowdown 1.0.2 2023-06-07 13:44:44 +02:00
poll.cpp LibC: Mark a bunch of functions as cancellation points 2022-07-22 10:07:15 -07:00
poll.h LibC: Add missing sys/cdefs.h include 2022-08-23 19:07:12 +01:00
priority.cpp
pthread_cond.cpp LibC: Mark a bunch of functions as cancellation points 2022-07-22 10:07:15 -07:00
pthread_integration.cpp LibC: Expect mutexes to be locked and needing wake when calling futex() 2023-08-09 05:31:35 +02:00
pthread_once.cpp Kernel: Clean up sys$futex and add support for cross-process futexes 2022-07-21 16:39:22 +02:00
pthread_tls.cpp LibC: Remove a bunch of weak pthread_* symbols 2022-07-19 20:58:51 -07:00
pthread.cpp Kernel+Userland: Remove the {get,set}_thread_name syscalls 2023-08-25 11:51:52 +02:00
pthread.h LibC: Add most of the "header may make visible" dependencies from POSIX 2023-07-19 00:19:35 -06:00
pty.cpp Everywhere: Remove unused includes of AK/Format.h 2023-01-02 20:27:20 -05:00
pty.h
pwd.cpp Everywhere: Use to_number<T> instead of to_{int,uint,float,double} 2023-12-23 20:41:07 +01:00
pwd.h LibC: Implement getpwent_r 2022-11-08 11:51:19 +01:00
qsort.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
regex.cpp LibC: Reduce reliance on the dlfcn internals for regex functions 2022-09-05 10:12:02 +01:00
regex.h LibC+LibRegex: Move regex_defs.h from LibC to LibRegex 2023-06-27 12:40:38 +02:00
resolv.cpp
resolv.h LibC: Add missing sys/cdefs.h include 2022-08-23 19:07:12 +01:00
scanf.cpp Everywhere: Use to_number<T> instead of to_{int,uint,float,double} 2023-12-23 20:41:07 +01:00
sched.cpp Kernel+LibC: Report correct scheduling priority limits 2022-10-27 11:30:19 +01:00
sched.h LibC: Add most of the "header may make visible" dependencies from POSIX 2023-07-19 00:19:35 -06:00
search.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
search.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
semaphore.cpp LibC: Convert semaphore and termcap to String 2023-07-06 10:15:37 +01:00
semaphore.h LibC: Add most of the "header may make visible" dependencies from POSIX 2023-07-19 00:19:35 -06:00
serenity.cpp Kernel+LibC: Pass 64-bit integers in syscalls by value 2023-08-12 01:14:26 +02:00
serenity.h LibC: Add missing sys/cdefs.h include 2022-08-23 19:07:12 +01:00
setjmp.h LibC: Implement setjmp and longjmp for riscv64 2024-01-14 16:06:59 -07:00
shadow.cpp Everywhere: Use to_number<T> instead of to_{int,uint,float,double} 2023-12-23 20:41:07 +01:00
shadow.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
signal.cpp LibC: Implement siginterrupt() 2023-12-26 18:36:43 +01:00
signal.h LibC: Implement siginterrupt() 2023-12-26 18:36:43 +01:00
spawn.cpp Everywhere: Remove unused includes of LibC/stdlib.h 2023-01-02 20:27:20 -05:00
spawn.h LibC: Add most of the "header may make visible" dependencies from POSIX 2023-07-19 00:19:35 -06:00
ssp_nonshared.cpp LibC: Properly implement stack protectors 2022-11-01 14:49:09 +00:00
ssp.cpp LibC+LibELF: Pass information from linker via magic lookup 2024-01-24 22:17:49 -07:00
stat.cpp LibC: Properly implement the futimens function 2023-04-10 10:21:28 +02:00
stdarg.h
stdint.h
stdio_ext.h LibC: Add missing sys/cdefs.h include 2022-08-23 19:07:12 +01:00
stdio.cpp Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
stdio.h LibC: Implement vdprintf and dprintf 2023-09-03 06:21:40 +02:00
stdlib.cpp LibC+LibELF: Pass information from linker via magic lookup 2024-01-24 22:17:49 -07:00
stdlib.h LibC: Add drand48, srand48 2023-08-28 00:40:35 +02:00
string.cpp LibC: Implement memccpy 2023-09-03 06:21:40 +02:00
string.h LibC: Implement memccpy 2023-09-03 06:21:40 +02:00
strings.cpp LibC: Add ffs{,l,ll} 2022-10-14 13:37:29 +02:00
strings.h LibC: Add ffs{,l,ll} 2022-10-14 13:37:29 +02:00
stubs.cpp Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
sysexits.h
syslog.cpp Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
syslog.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
termcap.cpp Userland: Prefer _string over _short_string 2023-08-08 07:37:21 +02:00
termcap.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
termios.cpp LibC: Mark a bunch of functions as cancellation points 2022-07-22 10:07:15 -07:00
termios.h LibC: Add missing sys/cdefs.h include 2022-08-23 19:07:12 +01:00
time.cpp Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
time.h LibC: Add most of the "header may make visible" dependencies from POSIX 2023-07-19 00:19:35 -06:00
times.cpp
tls.cpp LibC+LibELF: Support loading shared libraries compiled with dynamic TLS 2023-08-18 16:20:13 +02:00
ucontext.h LibC: Add public and independent ucontext.h header 2022-06-12 00:28:26 +01:00
ulimit.cpp LibC: Add a wrapper for the getrusage syscall 2022-02-28 20:09:37 +01:00
ulimit.h
unistd.cpp Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
unistd.h Kernel+Userland: Replace the beep syscall with the new /dev/beep device 2023-11-03 15:19:33 +01:00
utime.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
utime.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
utmp.h
utsname.cpp
wchar.cpp LibC: Implement wcswidth 2022-06-30 11:57:49 +02:00
wchar.h LibC: Add most of the "header may make visible" dependencies from POSIX 2023-07-19 00:19:35 -06:00
wctype.cpp Everywhere: Remove unused includes of AK/Format.h 2023-01-02 20:27:20 -05:00
wctype.h LibC: Add most of the "header may make visible" dependencies from POSIX 2023-07-19 00:19:35 -06:00
wstdio.cpp LibC: Automatically append null terminator in vswprintf 2022-03-20 08:40:36 -04:00