summaryrefslogtreecommitdiffstats
path: root/libexec/rtld-elf/rtld_lock.h
Commit message (Collapse)AuthorAgeFilesLines
* MFC r280816:kib2015-04-121-3/+3
| | | | Change default visibility for rtld to hidden, on x86.
* Implement support for ELF filters in rtld. Both normal and auxillarykib2010-12-251-4/+12
| | | | | | | | | | | | | | | | | filters are implemented. Filtees are loaded on demand, unless LD_LOADFLTR environment variable is set or -z loadfltr was specified during the linking. This forces rtld to upgrade read-locked rtld_bind_lock to write lock when it encounters an object with filter during symbol lookup. Consolidate common arguments of the symbol lookup functions in the SymLook structure. Track the state of the rtld locks in the RtldLockState structure. Pass local RtldLockState through the rtld symbol lookup calls to allow lock upgrades. Reviewed by: kan Tested by: Mykola Dzham <i levsha me>, nwhitehorn (powerpc)
* Provide custom simple allocator for rtld locks in libthr. The allocatorkib2008-12-021-0/+1
| | | | | | | | | does not use any external symbols, thus avoiding possible recursion into rtld to resolve symbols, when called. Reviewed by: kan, davidxu Tested by: rink MFC after: 1 month
* Add two rtld exported symbols, _rtld_atfork_pre and _rtld_atfork_post.kib2008-11-271-0/+2
| | | | | | | | | | | | | | Threading library calls _pre before the fork, allowing the rtld to lock itself to ensure that other threads of the process are out of dynamic linker. _post releases the locks. This allows the rtld to have consistent state in the child. Although child may legitimately call only async-safe functions, the call may need plt relocation resolution, and this requires working rtld. Reported and debugging help by: rink Reviewed by: kan, davidxu MFC after: 1 month (anyway, not before 7.1 is out)
* Fix the problem with the C++ exception handling for the multithreadedkib2008-05-061-0/+1
| | | | | | | | | | | | | | | | | | | | programs. From the PR description: The gcc runtime's _Unwind_Find_FDE function, invoked during exception handling's stack unwinding, is not safe to execute from within multiple threads. FreeBSD' s dl_iterate_phdr() however permits multiple threads to pass through it though. The result is surprisingly reliable infinite looping of one or more threads if they just happen to be unwinding at the same time. Introduce the new lock that is write locked around the dl_iterate_pdr, thus providing required exclusion for the stack unwinders. PR: threads/123062 Submitted by: Andy Newman <an at atrn org> Reviewed by: kan MFC after: 2 weeks
* Fix warnings; no parameters in function prototypes.mdodd2003-06-191-2/+2
|
* Allow threading libraries to register their own lockingkan2003-05-291-0/+63
implementation in case default one provided by rtld is not suitable. Consolidate various identical MD lock implementation into a single file using appropriate machine/atomic.h. Approved by: re (scottl)
OpenPOWER on IntegriCloud