linux/tools/include/nolibc
Thomas Weißschuh 63aa531716 tools/nolibc: add support for constructors and destructors
With the startup code moved to C, implementing support for
constructors and deconstructors is fairly easy to implement.

Examples for code size impact:

   text	   data	    bss	    dec	    hex	filename
  21837	    104	     88	  22029	   560d	nolibc-test.before
  22135	    120	     88	  22343	   5747	nolibc-test.after
  21970	    104	     88	  22162	   5692 nolibc-test.after-only-crt.h-changes

The sections are defined by [0].

[0] https://refspecs.linuxfoundation.org/elf/gabi4+/ch5.dynamic.html

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Acked-by: Willy Tarreau <w@1wt.eu>
Link: https://lore.kernel.org/lkml/20231007-nolibc-constructors-v2-1-ef84693efbc1@weissschuh.net/
2023-10-12 21:14:16 +02:00
..
.gitignore tools/nolibc: Add gitignore to avoid git complaints about sysroot 2023-03-20 08:45:21 -07:00
arch-aarch64.h tools/nolibc: automatically detect necessity to use pselect6 2023-10-12 21:14:13 +02:00
arch-arm.h tools/nolibc: arm: shrink _start with _start_c 2023-08-23 04:40:22 +02:00
arch-i386.h tools/nolibc: i386: Fix a stack misalign bug on _start 2023-10-12 21:10:37 +02:00
arch-loongarch.h tools/nolibc: automatically detect necessity to use pselect6 2023-10-12 21:14:13 +02:00
arch-mips.h tools/nolibc: mips: shrink _start with _start_c 2023-08-23 04:40:22 +02:00
arch-powerpc.h tools/nolibc: silence ppc64 compile warnings 2023-08-23 05:17:07 +02:00
arch-riscv.h tools/nolibc: automatically detect necessity to use pselect6 2023-10-12 21:14:13 +02:00
arch-s390.h tools/nolibc: s390: shrink _start with _start_c 2023-08-23 04:40:22 +02:00
arch-x86_64.h tools/nolibc: x86-64: Use rep stosb for memset() 2023-10-12 21:14:00 +02:00
arch.h tools/nolibc: add support for powerpc 2023-08-23 05:17:07 +02:00
compiler.h tools/nolibc: fix segfaults on compilers without attribute no_stack_protector 2023-06-09 11:46:08 -07:00
crt.h tools/nolibc: add support for constructors and destructors 2023-10-12 21:14:16 +02:00
ctype.h tools/nolibc: fix missing includes causing build issues at -O0 2023-01-09 09:36:05 -08:00
errno.h tools/nolibc: make errno a weak symbol instead of a static one 2023-01-10 13:33:55 -08:00
Makefile tools/nolibc: add stdarg.h header 2023-10-12 21:13:52 +02:00
nolibc.h tools/nolibc: add stdarg.h header 2023-10-12 21:13:52 +02:00
signal.h tools/nolibc: fix missing includes causing build issues at -O0 2023-01-09 09:36:05 -08:00
stackprotector.h tools/nolibc: stackprotector.h: make __stack_chk_init static 2023-08-23 05:17:07 +02:00
std.h tools/nolibc: add stdint.h 2023-03-20 08:45:21 -07:00
stdarg.h tools/nolibc: add stdarg.h header 2023-10-12 21:13:52 +02:00
stdint.h tools/nolibc: stdint: use __SIZE_TYPE__ for size_t 2023-08-23 05:17:07 +02:00
stdio.h tools/nolibc: add stdarg.h header 2023-10-12 21:13:52 +02:00
stdlib.h tools/nolibc: completely remove optional environ support 2023-08-23 04:40:22 +02:00
string.h tools/nolibc: string: Remove the _nolibc_memcpy_up() function 2023-10-12 21:14:03 +02:00
sys.h tools/nolibc: automatically detect necessity to use pselect6 2023-10-12 21:14:13 +02:00
time.h tools/nolibc: fix missing includes causing build issues at -O0 2023-01-09 09:36:05 -08:00
types.h tools/nolibc: remove the old sys_stat support 2023-08-23 04:40:22 +02:00
unistd.h tools/nolibc: unistd.h: reorder the syscall macros 2023-08-06 12:27:53 +02:00