summaryrefslogtreecommitdiffstats
path: root/libexec/rtld-elf
Commit message (Collapse)AuthorAgeFilesLines
...
* Clean out the leftovers from the i386_set_gsbase() TLS conversion.peter2005-06-291-17/+1
| | | | | | | | Like on libthr, there is an i386_set_gsbase() stub implementation here to avoid libc.so.5 issues. This should likely be a weak symbol and I expect this will be fixed soon. Approved by: re
* Removed trailing whitespace.ru2005-06-141-2/+2
| | | | Approved by: re (blanket)
* MFNetBSD: src/libexec/ld.elf_so/arch/sparc64/mdreloc.c 1.26 (partial)marius2005-06-041-1/+1
| | | | | | | Fix an obvious bug in the 64-bit PLT fixup: the SLLX was by 12 bits, when it should be 32. MFC after: 1 month
* Fix the load64 and store64 macros, created to handle 8-byte unalignedmarcel2005-06-021-6/+6
| | | | | | | | | | loads and stores (resp.) The ldq_u and stq_u instruction mask off the lower 3 bits of the final address before loading from or storing to the address, so as to avoid unaligned loads and stores. They do not themselves allow loads from or stores to unaligned addresses. Replace the macro definitions by a packed struct dereference. Submitted by: Richard Henderson (rth at twiddle dot net)
* Align the stack to a 16 byte boundary before calling _rtld so that we candfr2005-05-191-3/+6
| | | | | | safely initialise shared libraries that use SSE in their init sections. MFC After: 1 week
* Fix compilation problem.davidxu2005-04-271-1/+1
|
* Stop calling _amd64_set_gsbase() for COMPAT_32BIT. The amd64 kernelpeter2005-04-261-9/+2
| | | | implements i386_set_gsbase(), so there is no need for the variation.
* Attempt to use i386_set_gsbase(), and gracefully fall back to LDT methodspeter2005-04-141-13/+16
| | | | if the direct access methods are not implemented.
* No need to provide atomic_cmpset_32() anymore.cognet2005-04-071-12/+0
|
* When allocating TLS and DTV, make sure that any unused slots in the DTVdfr2005-03-301-8/+4
| | | | | | | | are initialised to zero. When freeing TLS, don't attempt to free DTV slots which were not used. Pointed out by: Joerg Sonnenberger X-MFC-After: After the branch, probably
* If "dangerous" environment variables (LD_PRELOAD, LD_LIBMAP,cperciva2005-03-241-1/+24
| | | | | | | | | | | | | LD_LIBMAP_DISABLE, LD_LIBRARY_PATH) are used, then make sure the libraries being loaded aren't on a noexec-mounted filesystem. This is a compromise position: I'm assuming that nobody will be silly enough to set the noexec mount flag on part of the default library path, in order to avoid adding extra overhead into the common case (where those environment variables aren't used). Discussed with: csjp, secteam MFC after: 1 week
* Add locking code for tls routines.davidxu2005-03-201-4/+21
|
* Attempt to free any static TLS space used by a shared library when itdfr2005-02-273-0/+24
| | | | | | | is unloaded. This allows applications which load and unload libraries like libGL.so.1 several times to work properly. MFC after: 2 days
* Only provide the dummy, non-atomic atomic_cmpset_32() ifcognet2005-02-261-0/+2
| | | | ARM_HAS_ATOMIC_CMPSET_32 isn't defined.
* Description from Dan:mdodd2005-02-044-13/+93
| | | | | | | | | | | | | | | Another handy libmap patch. Lets you do stuff like this: LD_LIBMAP="libpthread.so.1=libthr.so.1" mythreadedapp If you already have a program-specific override in libmap.conf, note that you must use a program-specific override in LD_LIBMAP: LD_LIBMAP="[mythreadedapp],libpthread.so.1=libthr.so.1" mythreadedapp PR: bin/74471 Submitted by: Dan Nelson <dnelson AT allantgroup.com> MFC after: 2 weeks
* style(9)mdodd2005-02-041-4/+3
|
* Implement a dummy atomic_cmpset_32(). It should be safe to use it in rtld ascognet2004-11-231-0/+11
| | | | the signals are masked anyway.
* Remove 80386 support from the ELF run time linker.jhb2004-11-162-163/+0
|
* So do it like we do in usr.bin/tip/tip/Makefile. ;)ru2004-11-141-0/+2
|
* Revert previous commit. As ru explains:schweikh2004-11-141-1/+1
| | | | | | | | | | | In the old world (as the surrounding comment in makefile says), there was the /usr/libexec/ld-elf.so.1 binary which is now a symlink to /libexec/ld-elf.so.1. To symlink, we need to make sure that the _target_ (and the target is /usr/libexec/ld-elf.so.1) doesn't have "schg" flag set. A real solution is to protect the chflags call only if target exists, like we do in usr.bin/tip/tip/Makefile. Requested by: ru
* Avoid an (ignored) error by invoking chflags on the link target, not theschweikh2004-11-141-1/+1
| | | | | | | | symlink. PR: kern/73016 Submitted by: John E. Hein <jhein@timing.com> MFC after: 1 week
* Remove these unused files before any other archs include the same bogusjhb2004-11-126-1057/+0
| | | | file.
* The 32 bit compatability ld-elf32.so.1 cannot use i386_set_ldt() whenpeter2004-11-061-0/+6
| | | | | running on an amd64 kernel. Use the recently exposed direct %fs/%gs set routines instead for the TLS setup of 32 bit binaries.
* Introduce the PRECIOUSPROG knob in bsd.prog.mk, similarru2004-11-031-1/+2
| | | | | | | | to PRECIOUSLIB from bsd.lib.mk. The side effect of this is making installing the world under jail(8) possible by using another knob, NOFSCHG. Reviewed by: oliver
* Implement TLS relocations for powerpc.ssouhlal2004-11-022-3/+73
| | | | Approved by: grehan (mentor)
* Do the TLS offset allocations before relocations, as otherwise theressouhlal2004-11-021-11/+11
| | | | | | | can be overlap in the TLS offsets, if the relocations are done in a certain order. Approved by: dfr, grehan (mentor)
* For variables that are only checked with defined(), don't provideru2004-10-241-1/+1
| | | | any fake value.
* Don't try to relocate the dynamic loader in reloc_non_plt(). It has alreadycognet2004-09-281-1/+4
| | | | been done before.
* Use add instead of saving the sp in a register.cognet2004-09-281-2/+1
|
* Add stubs for TLS.cognet2004-09-234-16/+32
| | | | Arbitraly choose the 2nd variant until I figure out which one I should use.
* Add stubs for powerpc TLS.dfr2004-08-043-5/+43
| | | | Submitted by: ssouhlal
* Add support for Thread Local Storage.dfr2004-08-0314-2/+883
|
* Consistently use __inline instead of __inline__ as the former is an empty macrostefanf2004-07-041-2/+2
| | | | in <sys/cdefs.h> for compilers without support for inline.
* Fix the problem that surfaced with the new binutils import on sparc64tmm2004-06-183-4/+10
| | | | | | | | | | | | | | | | | | | | | | (and that is for now being worked around by a binutils patch). The rtld code tested &_DYNAMIC against 0 to see whether rtld itself was built as PIC or not. While the sparc64 MD code did not rely on the preset value of the GOT slot for _DYNAMIC any more due to previous binutils changes, it still used to not be 0, so that this check did work. The new binutils do however initialize this slot with 0. As a consequence, rtld would not properly initialize itself and crash. Fix that by introducing a new macro, RTLD_IS_DYNAMIC, to take the role of this test. For sparc64, it is implemented using the rtld_dynamic() code that was already there. If an architecture does not provide its own implementation, we default to the old check. While being there, mark _DYNAMIC as a weak symbol in the sparc64 rtld_start.S. This is needed in the LDSCRIPT case, which is however not currently supported for want of an actual ldscript. Sanity checked with md5 on alpha, amd64, i386 and ia64.
* This comment should have been removed in the previous commit.cognet2004-06-171-1/+0
| | | | Spotted out by: marcus, simon
* Woohoo !cognet2004-06-172-4/+0
| | | | the latest binutils import mades this gross hack useless, so just remove it.
* give out a little more information in case of a missing dependencyeik2004-05-281-1/+6
| | | | | | | | PR: 56549 Submitted by: edwin Reviewed by: joerg, ru Approved by: joerg MFC after: 2 weeks
* Support basename and path based constrained matches.mdodd2004-05-241-1/+29
| | | | | | | | | | | | | | | | | | eg: [foo] ... matches any executable 'foo' [/usr/bin/foo/] ... matches any executable under the directory /usr/bin/foo/ Exact matches continue to function as before. PR: bin/66769 Submitted-by: Dan Nelson
* Work around a problem somewhere with binutils (?) on arm, hopefully withoutcognet2004-05-152-0/+5
| | | | breaking any other arch this time.
* Fix breakage caused by alphabetically sorting SRCS: rtld_start.S must come ↵se2004-05-141-1/+2
| | | | | | first! The previous version made all shared binaries dump core.
* Import arm bits for rtld-elf.cognet2004-05-146-2/+684
| | | | Obtained from: NetBSD
* If we change obj_rtld.path after initialising __progname, make sure wedfr2004-03-291-0/+1
| | | | | change __progname to point at the new storage otherwise it ends up pointing at freed memory which leads to confusing garbled error messages.
* More stack alignment fixes. Arrange so we call _rtld() in ld-elf.so.1peter2004-03-211-8/+9
| | | | | | | | | with the correct alignment. This is important because this calls to library static constructors are made from here. The bug in the old crt*.s files hid this because in this case, two wrongs do indeed make a right. Also, call _rtld_bind() with the correct alignment, because it calls back into the pthread library locking functions. If things happen just the wrong way, we get a SIG10 due to the broken stack alignment.
* Add initial support for compiling a special 32 bit version ofpeter2004-03-216-19/+78
| | | | | | | ld-elf.so.1 on 64 bit systems. Most of this involves using alternate paths, environment variables and diagnostic messages. The build glue is seperate.
* Make NULL a (void*)0 whereever possible, and fix the warnings(-Werror)markm2004-03-051-4/+4
| | | | | | | | | | | | | | | that this provokes. "Wherever possible" means "In the kernel OR NOT C++" (implying C). There are places where (void *) pointers are not valid, such as for function pointers, but in the special case of (void *)0, agreement settles on it being OK. Most of the fixes were NULL where an integer zero was needed; many of the fixes were NULL where ascii <nul> ('\0') was needed, and a few were just "other". Tested on: i386 sparc64
* Do not depend on existence of _end symbol in obj_from_addr, usekan2004-02-251-8/+1
| | | | | | obj->mapbase and obj->mapsize instead. Prompted by: OpenOffice debugging session at last BSDCon.
* Fix "warning: value computed is not used".fjoe2004-02-031-1/+1
| | | | Found by: gcc 2.95.4 [FreeBSD]
* Initialise some uninitialised variables.dfr2003-12-311-0/+2
| | | | Thanks to: valgrind
* Fix dynamic linking a bit more.. enough that mozilla-firebird works if youpeter2003-12-121-3/+3
| | | | | | dig up the patches for amd64 support for it. Note to self: do not put a 64 bit value in a 32 bit space.
* Revert last change. ../rtld.c uses CACHE_LINE_SIZE too.peter2003-12-111-0/+2
| | | | | | Change it to 64 while here. Reported by: ps
OpenPOWER on IntegriCloud