summaryrefslogtreecommitdiffstats
path: root/libexec
Commit message (Collapse)AuthorAgeFilesLines
* MFC r313494:kib2017-02-241-8/+12
| | | | Handle protected symbols in rtld.
* MFC r289172,r290254:ngie2017-02-094-12/+4
| | | | | | | | | | | | | | | | r289172: Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) and netbsd-tests.test.mk (r289151) - Eliminate explicit OBJTOP/SRCTOP setting - Convert all ad hoc NetBSD test integration over to netbsd-tests.test.mk - Remove unnecessary TESTSDIR setting - Use SRCTOP where possible for clarity r290254: Remove unused variable (SRCDIR)
* MFC r311473:ngie2017-02-042-3/+13
| | | | | | Conditionalize all code that uses tcpd.h behind `LIBWRAP` guard This will allow the code to stand by itself without libwrap
* MFC r311886:kib2017-01-241-24/+29
| | | | | | Fix acquisition of nested write compat rtld locks. PR: 215826
* MFC r310025:bdrewery2017-01-241-2/+2
| | | | Take write lock for rtld_bind before modifying obj_list in dl_iterate_phdr().
* MFC r311984:kib2017-01-191-8/+20
| | | | | For the main binary, postpone enforcing relro read-only protection until copy relocations are done.
* MFC r311879:kib2017-01-171-4/+4
| | | | Use ANSI C definitions, update comment.
* MFC r310609: Don't use high precision clock for expiration as only seconddelphij2017-01-091-7/+7
| | | | portion is used.
* MFC r310608: Avoid use after free.delphij2017-01-091-4/+6
|
* MFC r310155:kib2016-12-191-1/+1
| | | | Fix typo.
* MFC 308456: Pass the correct flag to find_symdef() from _rtld_bind().jhb2016-12-012-3/+3
| | | | | | | | When symbol versioning was added to rtld, the boolean 'in_plt' argument to find_symdef() was converted to a bitmask of flags. The first flag added was 'SYMLOOK_IN_PLT' which replaced the 'in_plt' bool. This happened to still work by accident as SYMLOOK_IN_PLT had the value of 1 which is the same as 'true', so there should be no functional change.
* MFC r308689:kib2016-11-2318-4/+142
| | | | | | | | | | Pass CPUID[1] %edx (cpu_feature), %ecx (cpu_feature2) and CPUID[7].%ebx (cpu_stdext_feature), %ecx (cpu_stdext_feature2) to the ifunc resolvers on x86. MFC r308925: Adjust r308689 to make rtld compilable with either in-tree or (hopefully) stock gcc 4.2.1 on i386 and other arches.
* MFC r308688:kib2016-11-221-1/+1
| | | | Assert that there is no unresolved symbols during rtld linking.
* MFC r308687:kib2016-11-221-1/+1
| | | | Update hint to utilize user variable.
* MFstable/11 r307721:ngie2016-10-212-2/+2
| | | | | | MFC r306029: Use SRCTOP instead of the longhand version for defining the path to contrib/atf
* MFC r304012:kib2016-08-191-0/+4
| | | | Fill phdr and phsize for rtld object.
* MFC r304011:kib2016-08-191-10/+6
| | | | Remove all remaining uses of TAILQ_FOREACH_FROM() from rtld-elf.
* MFC r302908:bdrewery2016-07-221-1/+1
| | | | | Fix dlsym(RTLD_NEXT) handling to only return the next library in last library cases.
* MFC r300691:kib2016-06-081-7/+28
| | | | Fix issues found by Coverity in the rtld-elf.c:gethints().
* MFC r299585truckman2016-05-201-3/+3
| | | | | | | | | Declare line[] in the outermost scope of retrieve() instead of declaring it in an inner scope and then using it via a pointer in the outer scope. Reported by: Coverity CID: 605895
* MFC r296319:kib2016-03-163-19/+42
| | | | | | | Fix handling of DT_TEXTREL for an object with more than one read-only segment. PR: 207631
* MFC r295079:ngie2016-03-121-1/+2
| | | | | | | Fix the type for hw.ncpu, so sysctlbyname doesn't consistently fail on 64-bit architectures where sizeof(int) != sizeof(size_t). PR: 206758
* MFC r257811 (by markj):kib2016-03-129-96/+176
| | | | | | | | | | | | | | | Include rtld itself when iterating over loaded ELF objects in dl_iterate_phdr(3). MFC r294373: Do not call callbacks for dl_iterate_phdr(3) with the rtld bind and phdr locks locked. MFC r294470 (by kan): Fix initlist_add_object invocation parameters. MFC r294936 (by kan): Do not unlock rtld_phdr_lock over callback invocations.
* MFC r292705: rtld: remove old XXX comment missed in r35529emaste2016-01-071-1/+0
|
* MFC r291348:bdrewery2015-12-043-3/+3
| | | | Use LIBEXECDIR for /usr/libexec.
* MFC r289324:kib2015-10-281-3/+21
| | | | | Allow PT_NOTES segments to be located anywhere in the executable image.
* Disable SSE in libthrvangyzen2015-10-262-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clang emits SSE instructions on amd64 in the common path of pthread_mutex_unlock. If the thread does not otherwise use SSE, this usage incurs a context-switch of the FPU/SSE state, which reduces the performance of multiple real-world applications by a non-trivial amount (3-5% in one application). Instead of this change, I experimented with eagerly switching the FPU state at context-switch time. This did not help. Most of the cost seems to be in the read/write of memory--as kib@ stated--and not in the #NM handling. I tested on machines with and without XSAVEOPT. One counter-argument to this change is that most applications already use SIMD, and the number of applications and amount of SIMD usage are only increasing. This is absolutely true. I agree that--in general and in principle--this change is in the wrong direction. However, there are applications that do not use enough SSE to offset the extra context-switch cost. SSE does not provide a clear benefit in the current libthr code with the current compiler, but it does provide a clear loss in some cases. Therefore, disabling SSE in libthr is a non-loss for most, and a gain for some. I refrained from disabling SSE in libc--as was suggested--because I can't make the above argument for libc. It provides a wide variety of code; each case should be analyzed separately. https://lists.freebsd.org/pipermail/freebsd-current/2015-March/055193.html Suggestions from: dim, jmg, rpaulo Sponsored by: Dell Inc.
* MFC r287369:andrew2015-09-081-1/+1
| | | | | | | | | | | | | | | | | | | Ensure we use calculate_first_tls_offset, even if the main program doesn't have TLS program header. This is needed on architectures with Variant I tls, that is arm, arm64, mips, and powerpc. These place the thread control block at the start of the buffer and, without this, this data may be trashed. This appears to not be an issue on mips or powerpc as they include a second adjustment to move the thread local data, however this is on arm64 (with a future change to fix placing this data), and should be on arm. I am unable to trigger this on arm, even after changing the code to move the data around to make it more likely to be hit. This is most likely because my tests didn't use the variable in offset 0. Reviewed by: kib MFC after: 1 week Sponsored by: ABT Systems Ltd
* MFC r282551: Remove historical GNUC testemaste2015-08-312-8/+0
| | | | | | | The requirement is for a GCC-compatible compiler and not necessarily GCC itself. However, we currently expect any compiler used for building the whole of FreeBSD to be GCC-compatible and many things will break if not; there's no longer a need to have an explicit test for this in rtld.
* MFC 284709:wblock2015-06-301-11/+13
| | | | | Call /etc/crontab the "system crontab", not "root's crontab". While here, fix some other wording issues
* MFH (r277695): allow tracing dlfunc() / dlsym() eventsdes2015-06-301-4/+13
|
* MFC r282245:kib2015-05-061-14/+0
| | | | | | | Remove the #ifdef DEBUG code, which is not compilable on 64bit architectures. PR: 199767
* MFC r282109:kib2015-05-041-36/+45
| | | | Always do token substitution, do not require -z origin to do it.
* MFC r281107: MIPS rtld: report missing symbol rather than segfaultingemaste2015-04-281-1/+1
| | | | | This is only an interim fix; MIPS should be using the MI code instead, which does not have this issue.
* MFC r281005: Make die available as rtld_die for use by MD relocation codeemaste2015-04-282-19/+19
| | | | Sponsored by: The FreeBSD Foundation
* MFC r281549:kib2015-04-222-17/+31
| | | | Implement support for -z global linker option.
* MFC r268182: Initialize page sizes early for ia64.peter2015-04-132-0/+9
|
* MFC r280816:kib2015-04-1212-16/+43
| | | | Change default visibility for rtld to hidden, on x86.
* MFC r264346 (by alc):kib2015-04-124-25/+67
| | | | | Pass MAP_ALIGNED_SUPER to allocate the whole dso region if its text is large enough for the superpage mapping.
* MFC: r279364jkim2015-03-061-8/+7
| | | | Use realpath(3) to properly expand $ORIGIN to its absolute path.
* MFC r278192:ngie2015-03-011-6/+24
| | | | | | | | | | | | | | | | Add the following options to enable/disable several features in the base system WITHOUT_BOOTPARAMD - bootparamd WITHOUT_BOOTPD - bootpd WITHOUT_FINGER - finger, fingerd WITHOUT_FTP - ftp, ftpd WITHOUT_INETD - inetd WITHOUT_RBOOTD - rbootd WITHOUT_TCP_WRAPPERS - tcpd, et al WITHOUT_TFTP - tftp, tftp-server WITHOUT_TIMED - timed Sponsored by: EMC / Isilon Storage Division
* MFC 275412:jhb2015-02-231-0/+2
| | | | | | | | | | | | | The runtime linker needs to include a path to itself in the link map it exports to the debugger. It currently has two choices: it can use a compiled-in path (/libexec/ld-elf.so.1) or it can use the path stored in the interpreter path in the binary being executed. The runtime linker currently prefers the second. However, this is usually wrong for compat32 binaries since the binary specifies the path of rtld on a 32-bit system (/libexec/ld-elf.so.1) instead of the actual path (/libexec/ld-elf32.so.1). For now, always assume the compiled in path (/libexec/ld-elf32.so.1) as the rtld path and ignore the path in the binary for the 32-bit runtime linker.
* MFC r277676:ngie2015-02-131-1/+4
| | | | | | | | r277676: Add MK_TALK knob for building the talk and talkd Sponsored by: EMC / Isilon Storage Division
* MFC r277936:kib2015-02-061-5/+3
| | | | Use powerof2(). Remove single-use variable.
* MFC r276627:kib2015-01-103-0/+24
| | | | | Add rtld private interface for dso to detect dynamic loading vs. static linking.
* MFC r264400,r265836:ngie2014-12-312-2/+2
| | | | | | | | | | | | | | r264400: NO_MAN= has been deprecated in favor of MAN= for some time, go ahead and finish the job. ncurses is now the only Makefile in the tree that uses it since it wasn't a simple mechanical change, and will be addressed in a future commit. r265836: Remove last two NO_MAN= in the tree. In both of these cases, MAN= is what is needed.
* MFC r273929:ngie2014-12-213-3/+10
| | | | | | r273929 (by jmmv): MFV: Import atf-0.21.
* MFC r274364:ngie2014-12-051-0/+1
| | | | | | | | | | | | | | Add baud rate support to telnet(1) This implements part of RFC-2217 It's based off a patch originally written by Sujal Patel at Isilon, and contributions from other Isilon employees. PR: 173728 Phabric: D995 Reviewed by: markj, markm Sponsored by: EMC / Isilon Storage Division
* Always return pathname in dl_iterate_phdr's dlpi_name, as Linux doesemaste2014-11-141-2/+1
| | | | | | | | | | | | | Linux LD_ITERATE_PHDR(3): The dlpi_name field is a null-terminated string giving the pathname from which the shared object was loaded. That functionality is much more useful than returning just the short name. Update dl_iterate_phdr(3) to follow r272842 MFC of r272842 and r272848
* MFC r271493,271688-271689,271696,271854,272139-272143:delphij2014-09-302-0/+15
| | | | | | | | | | | | Import HyperV Key-Value Pair (KVP) driver and daemon code by Microsoft, many thanks for their continued support of FreeBSD. While I'm there, also implement a new build knob, WITHOUT_HYPERV to disable building and installing of the HyperV utilities when necessary. The HyperV utilities are only built for i386 and amd64 targets. Approved by: re (gjb)
OpenPOWER on IntegriCloud