summaryrefslogtreecommitdiff
path: root/libexec/ld.so
AgeCommit message (Collapse)Author
2014-09-22Correct the token used.Brad Smith
Pointed out by LLVM. ldasm.S:111:74: error: unexpected token in '.type' directive .section ".text" ; .align 4 ; .global _dl_issetugid ; .type _dl_issetugid%function ;_dl_issetugid: ; movl $253,%eax; int $0x80 ; jb .L_cerr ; ret ^ ok guenther@
2014-09-01Sync readlink(2) with IEEE Std 1003.1-2008.Doug Hogan
discussion, help and ok guenther@
2014-08-30Make the handling of PLT entries above the 32k mark thread-safe.Philip Guenther
Also, make a comment not lie: use the V9 ISA's relative branch immediate instruction for short (with in 2^19 words) PLT branches. ok miod@
2014-08-19ld.so(1): Missing stack var initializationMasao Uebayashi
Explicitly zero-clear stack array to read dynamic segments. This code has been working because stack is mapped as anon and zero'ed right after execve(2). Found by work-in-progress Valgrind port for OpenBSD/amd64. OK millert@ guenther@
2014-07-28_dl_sigprocmask() works better when it actually saves the returned sigmaskPhilip Guenther
asm suggestion from kettenis@ tested by miod@, suffering under the brain-destroying summer heat
2014-07-14Now that we have sendsyslog(2), we can directly use it in theTheo de Raadt
(previously completely retarded) stack_smash_handler of ld.so ok beck miod tedu
2014-07-10check all memory allocations; ok miod@ guenther@Otto Moerbeek
2014-07-10typo in previousMiod Vallat
2014-07-09Use O_CLOEXEC to make sure fork+exec in a threaded process can'tPhilip Guenther
see the fds used by dlopen() ok otto@ miod@
2014-07-09_dl_fcntl() is no longer used; kill the stubsPhilip Guenther
ok otto@ miod@
2014-07-09Resync _dl_opendir() with libc: use O_CLOEXEC and O_DIRECTORY insteadPhilip Guenther
of post-open tests and fixups. Also, reorder _dl_dirdesc to save 8 bytes on LP64. ok otto@ miod@
2014-07-09Fix backtraces through _dl_bind_start by adding dwarf annotations forPhilip Guenther
the stack adjustments/handling in the asm. Based on FreeBSD. ok kettenis@ matthew@
2014-07-06allocate two things, test two pointers; ok miod@ guenther@Otto Moerbeek
2014-07-06int all fields, so calloc can become malloc; ok miod@Otto Moerbeek
2014-07-06enable -Wall, explicitly call _dl_strsep, and zap some redundant includesOtto Moerbeek
ok miod@
2014-07-06Apply ld.so's sod.c 1.25 (do not divide by zero in _dl_findhit if there is aMiod Vallat
valid hints file but no buckets in it) here too, in order to keep both instances of this code in sync.
2014-07-06this version of malloc does not need string.hOtto Moerbeek
2014-07-06rm unneeded includes; prompted (partly) by kettenis@Otto Moerbeek
2014-07-06move from sysclt(KERN_ARND) to getentropy(2); ok miod@, kettenis@Otto Moerbeek
2014-07-05Mark _dl_exit __dead.Miod Vallat
2014-07-05Implement _dl_mmap as direct mmap(2) wrapper, without needing to useMiod Vallat
__syscall(2) - calling convention will conveniently provide the padding argument.
2014-07-05Add more sugar to build syscall stubs, and turn them from inlines to realMiod Vallat
entry points; also, make sure syscall failures return -errno rather than -1.
2014-07-05Add more sugar to build syscall stubs, and turn them from inlines to realMiod Vallat
entry points, now that we no longer need _dl_mprotect to be inline; also, make sure syscall failures return -errno rather than -1.
2014-07-05Add more sugar to generate syscall stubs; and make sure errors are reportedMiod Vallat
with a negative value (I'm looking at you, _dl_mmap);
2014-07-05Unlike libc syscall stubs, ld.so syscall stubs are expected to return -errno,Miod Vallat
rather than -1, upon failure. Even though nothing in ld.so currently needs to explicitely check for specific error values, consistency doesn't hurt.
2014-07-05No need to redefine DT_PROCNUM and DT_BIND_NOW here, these are provided by MIMiod Vallat
<elf_abi.h>.
2014-07-04Remove bogus mprotect call from RELOC_REL() - this macro is used to relocateMiod Vallat
ld.so itself only, and ld.so on mips only has relocations in the .data section, which is writable.
2014-06-21Move to a non-zeroing _dl_malloc, a _dl_calloc and _dl_reallocarry andOtto Moerbeek
fix _dl_strdup to return NULL instead of crash; ok deraadt@
2014-06-15move to a smaller rbytes buffer; ok miod@ deraadt@Otto Moerbeek
2014-06-21Move to a non-zeroing _dl_malloc, a _dl_calloc and _dl_reallocarry andOtto Moerbeek
fix _dl_strdup to return NULL instead of crash; ok deraadt@
2014-06-14Make _dl_randombuf invoke sysctl KERN_ARND in 256-byte chunks, for this isMiod Vallat
(currently) the largest output you can get from it. ok deraadt@
2014-06-05add malloc.cOtto Moerbeek
2014-06-05Move to (slightly stripped) version of libc malloc; ok deraadt@Otto Moerbeek
2014-05-28Remove additional files generated during ld.so build on make clean.Brad Smith
From drahn Bitrig ok miod@ guenther@
2014-05-25Appease LLVM warnings..Brad Smith
error: shift count >= width of type [-Werror,-Wshift-count-overflow] Rework the ld.so relocation mask initialization. Clang complained about the shift code in the old versions of these, so improve the code. From drahn Bitrig ok miod@
2014-05-02No need to figure out the area spanned by .got in _dl_md_reloc(); onlyMiod Vallat
_dl_md_reloc_boot() needs to compute this.
2014-04-16It's been a quarter century: we can assume volatile is present with that name.Philip Guenther
2014-03-18Retire hp300, mvme68k and mvme88k ports. These ports have no users, keepingMiod Vallat
this hardware alive is becoming increasingly difficult, and I should heed the message sent by the three disks which have died on me over the last few days. Noone sane will mourn these ports anyway. So long, and thanks for the fish.
2014-02-22Delete descriptions of env variables that we don't actually support.Philip Guenther
They all sound like bad ideas anyway. ok matthew@ deraadt@
2014-02-16Unbreak ld.so with ssp-strong/all on sparc64 and powerpc. With theMartynas Venckus
new SSP logic it additionally protects functions which have their local addresses taken of, and _dl_boot_bind() gets selected. We have to go through GOT to reach __guard_local, however it hasn't been relocated yet. So add boot.c and don't protect everything up to the point until it has been relocated and no longer needs the loff adjustment. OK matthew@. Full build done & tested by florian@.
2014-01-23improve some typesTheo de Raadt
2014-01-23Remove LD_NORANDOM feature. It serves no usable purpose. DeterminismTheo de Raadt
in this one specific area is not going to help debugging, because so many other parts are non-deterministic. ok guenthre matthew jsing
2014-01-19Only i386 needs mquery; delete the static inlines from amd64 and hppaPhilip Guenther
2014-01-18Make ld.so pass its cleanup handler in $2 as required by the MIPS System VMark Kettenis
ABI, and completely remove the code that attempts to call atexit(3) directly.
2013-12-31Don't consider ld.so to be successfully built unless a test programPhilip Guenther
using it works, because seeing "make build" fail right after it installs a broken ld.so is *#!&%(@*)# annoying. Presumably needs to be fixed for cross-builds. ok matthew@ deraadt@ miod@
2013-12-30When a function does not obviously terminate itself, it is good practiceTheo de Raadt
to clean up a bit.
2013-12-28Do not need __guard anymoreTheo de Raadt
Discussion with miod ok kettenis
2013-12-25Pass _dl_dtors as the csu cleanup routine on shMiod Vallat
2013-12-25Pass _dl_dtors as the csu cleanup routine on arm.Miod Vallat
2013-12-25Pass _dl_dtors as the csu cleanup routine on m68k and m88k; change theMiod Vallat
conditional in the MI code to only list the architectures left to adapt.