master
For strange reasons which made sense at the time, the text segment was placed head of the btext (boot.text) segment. (the boot.text segment is "unmapped" after initization, as a self-protection mechanism). this meant the LOAD's virtual addresses were not in sequence, which clearly isn't what we intended.
Some of architectures do not us the stack protector (for example, retguard or hppa with reverse stack). So they do not call __stack_smash_handler(), and do not call sendsyslog(2). On those architectures, we can onditionally remove the syscall stub (which also removes it from the pinsyscalls table), and the stack protector handler. ok miod
enable -fret-clean on amd64, for libc libcrypto ld.so kernel, and all the ssh tools. The dynamic objects are entirely ret-clean, static binaries will contain a blend of cleaning and non-cleaning callers.
Prep .c files for removing the #includes from */archdep.h * replace #include "archdep.h" with #includes of what is used, pulling in "syscall.h", "util.h", and "archdep.h" as needed * delete #include <sys/syscall.h> from syscall.h * only pull in <sys/stat.h> to the three files that use _dl_fstat(), forward declare struct stat in syscall.h for the others * NBBY is for <sys/select.h> macros; just use '8' in dl_printf.c * <machine/vmparam.h> is only needed on i386; conditionalize it * stop using __LDPGSZ: use _MAX_PAGE_SHIFT (already used by malloc.c) where necessary * delete other bogus #includes, order legit per style: <sys/*> then <*/*>, then <*>, then "*"
ldd can pledge "stdio rpath proc exec prot_exec". We can later bifurbicate at the dlopen vs execve split, dropping either "proc" or "prot_exec". ok gnezdo
Make sure the syscall table entries are aligned on a 4-byte boundary. Required for strict-alignment architectures and a good idea on others. same as kettenis commit to libc
Bump ELF_RANDOMIZE_LIMIT to 1MB. ok deraadt@
Use a Thread Information Block in both single and multi-threaded programs. This stores errno, the cancelation flags, and related bits for each thread and is allocated by ld.so or libc.a. This is an ABI break from 5.9-stable!
Use a static chacha instance to fill randomdata sections. Avoids looping over a syscall for randomdata sections larger than 256B.
Wrap function declarations with __{BEGIN,END}_HIDDEN_DECLS to reduce relocations inside ld.so that it has to bootstrap
ugly whitespaces
Document search order
ld.so should stop calling msyscall(2), since it is fully neutered and about to be removed. Please be careful building through this, you need a kernel at least March 29th or so to build through it, otherwise use snapshots to cross over. ok various people
revert cache lookup for full pathnames
Avoid pulling sys/param.h, by using _ALIGN instead. sys/time.h now gets NBBY and howmany() also ok guenther
Eliminate failure returns from _dl_split_path(): if malloc fails just _dl_oom() Prompted by Qualys's leveraging malloc failure in _dl_split_path() to get stuff past.
remove prototypes with no matching function and externs with no var partly checked by millert@
The /var/run/ld.so.hints file is mapped into memory. It is never replaced, so the mapping can be immutable. ok kettenis
locally us MAXIMUM() rather than MAX() ok tb gnezdo
use SIGKILL instead of 9; ok guenther