blob: e028f411263e946da172bd31b9d9fe57cf6f515b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
Implement libc thunk library
Thunking libc itself has the potential to make thunking other libraries significantly more robust by making various workarounds unnecessary (see #1208). Here's an (incomplete) list of nontrivial things that need to be tackled:
* Program startup (`__libc_start_main`)
* `printf`-like functions (including fprintf, sprintf, snprintf, vprintf, ...)
* Functions with function pointer arguments (`qsort`)
* Data symbol handling:
* `errno`
* getopt: `optarg`/`optind`/`opterr`/`optopt`
* Struct repacking:
* Repacking of data in parameter structs that have different layouts across architectures (e.g. `stat`)
* Repacking for arguments passed to callbacks
* `__lxstat`/`__fxstat`/...: Data layout of parameter struct is determined by a version field
|