freebsd-skq/libexec/rtld-elf
Konstantin Belousov 0e9a260520 Rtld links with the specially built pic static libc library to get some
C runtime services, like printf(). Unfortunately, the multithread-safeness
measures in the libc do not work in rtld environment.

Rip the kernel printf() implementation and use it in the rtld instead of
libc version. This printf does not require any shared global data and thus
is mt-safe. Systematically use rtld_printf() and related functions, remove
the calls to err(3).

Note that stdio is still pulled from libc due to libmap implementaion using
fopen(). This is safe but unoptimal, and can be changed later.

Reported and tested by:	pgj
Diagnosed and reviewed by:	kan (previous version)
Approved by:	re (bz)
2011-08-24 20:05:13 +00:00
..
amd64 When loading dso without PT_GNU_STACK phdr, only call 2011-01-25 21:12:31 +00:00
arm When loading dso without PT_GNU_STACK phdr, only call 2011-01-25 21:12:31 +00:00
i386 When loading dso without PT_GNU_STACK phdr, only call 2011-01-25 21:12:31 +00:00
ia64 When loading dso without PT_GNU_STACK phdr, only call 2011-01-25 21:12:31 +00:00
mips When loading dso without PT_GNU_STACK phdr, only call 2011-01-25 21:12:31 +00:00
powerpc When loading dso without PT_GNU_STACK phdr, only call 2011-01-25 21:12:31 +00:00
powerpc64 Remove dead code that snuck in from the 32-bit PowerPC version of this 2011-03-07 20:32:46 +00:00
sparc64 - Add support for TLS relocations. 2011-03-11 21:08:02 +00:00
debug.c Rtld links with the specially built pic static libc library to get some 2011-08-24 20:05:13 +00:00
debug.h Use C99's varadic macro syntax instead of gcc's. 2006-03-28 18:26:47 +00:00
libmap.c Fix a malloc overrun in 32-bit compat libmap lookup code. 2006-01-31 06:08:28 +00:00
libmap.h
Makefile Rtld links with the specially built pic static libc library to get some 2011-08-24 20:05:13 +00:00
malloc.c Rtld links with the specially built pic static libc library to get some 2011-08-24 20:05:13 +00:00
map_object.c When loading dso without PT_GNU_STACK phdr, only call 2011-01-25 21:12:31 +00:00
rtld_lock.c Rtld links with the specially built pic static libc library to get some 2011-08-24 20:05:13 +00:00
rtld_lock.h Implement support for ELF filters in rtld. Both normal and auxillary 2010-12-25 08:51:20 +00:00
rtld_printf.c Rtld links with the specially built pic static libc library to get some 2011-08-24 20:05:13 +00:00
rtld_printf.h Rtld links with the specially built pic static libc library to get some 2011-08-24 20:05:13 +00:00
rtld_tls.h
rtld.1 Implement support for ELF filters in rtld. Both normal and auxillary 2010-12-25 08:51:20 +00:00
rtld.c Rtld links with the specially built pic static libc library to get some 2011-08-24 20:05:13 +00:00
rtld.h Rtld links with the specially built pic static libc library to get some 2011-08-24 20:05:13 +00:00
Symbol.map Remove a hack made obsolete by the binutils 2.17 merge. 2011-02-20 16:16:42 +00:00
xmalloc.c Rtld links with the specially built pic static libc library to get some 2011-08-24 20:05:13 +00:00