summaryrefslogtreecommitdiff
path: root/src/ldso
AgeCommit message (Collapse)AuthorLines
2011-06-25keep track of which dsos have been relocatedRich Felker-0/+1
2011-06-23prepare support for LD_LIBRARY_PATH (checking suid/sgid safety)Rich Felker-0/+6
the use of this test will be much stricter than glibc and other typical implementations; the environment will not be honored whatsoever unless the program is confirmed non-suid/sgid by the aux vector the kernel passed in. no fallback to slow syscall-based checking is used if the kernel fails to provide the information; we simply assume the worst (suid) in this case and refuse to honor environment.
2011-06-19make ldso asm more uniform with rest of codebase (no unnecessary suffixes)Rich Felker-12/+12
2011-06-19x86_64: ensure that dtor pointer passed to app is 0 so it won't be usedRich Felker-0/+1
leaving it uninitialized caused unpredictable crashes or worse due to calling an indeterminate function pointer.
2011-06-18dynamic linker 64bit fix: hash table entries are always 32bitRich Felker-2/+2
2011-06-18experimental dynamic linker!Rich Felker-0/+412
some notes: - library search path is hard coded - x86_64 code is untested and may not work - dlopen/dlsym is not yet implemented - relocations in read-only memory won't work
2011-02-24various changes in preparation for dynamic linking supportRich Felker-0/+8
prefer using visibility=hidden for __libc internal data, rather than an accessor function, if the compiler has visibility. optimize with -O3 for PIC targets (shared library). without heavy inlining, reloading the GOT register in small functions kills performance. 20-30% size increase for a single libc.so is not a big deal, compared to comparaible size increase in every static binaries. use -Bsymbolic-functions, not -Bsymbolic. global variables are subject to COPY relocations, and thus binding their addresses in the library at link time will cause library functions to read the wrong (original) copies instead of the copies made in the main program's bss section. add entry point, _start, for dynamic linker.