summaryrefslogtreecommitdiffstats
path: root/libexec
Commit message (Collapse)AuthorAgeFilesLines
* 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)
* Properly revert r272128.gjb2014-09-262-15/+0
| | | | | Approved by: re (implicit) Sponsored by: The FreeBSD Foundation
* Revert r272149, which introduces obscure vestiges from thegjb2014-09-262-0/+15
| | | | | | | r272128 reversal. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation
* Revert r272128:gjb2014-09-262-15/+0
| | | | | | | | | | | Though this passes the buildworld test, this fails during installworld with: make[3]: "/releng/scripts-release/chroots/10/i386/release/etc/devd/Makefile" line 13: Malformed conditional (${MK_HYPERV} != "no") Approved by: re (implicit) Sponsored by: The FreeBSD Foundation
* MFC r271493,271688,271689,271696,271854:delphij2014-09-252-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)
* MFC r270798:kib2014-09-1210-334/+321
| | | | | | | | | | Process STT_GNU_IFUNC when doing non-plt relocations. MFC r270802: Only do the second pass over non-plt relocations when the first pass found IFUNCs. Approved by: re (gjb)
* MFC r267176, r267181, r268445 (ATF-related commits):ngie2014-09-095-2/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Phabric: https://reviews.freebsd.org/D706 Approved by: rpaulo (mentor) Approved by: re (gjb) Reviewed by: jmmv Sponsored by: EMC / Isilon Storage Division r267176: Add the *_TESTS_SH_SED_* functionality to atf.test.mk. This exists already in plain.test.mk and tap.test.mk and should have been added to atf.test.mk too when the feature was first introduced. (It is probably time to address the related TODOs but I will do that separately.) r267181: Move atf-sh from /usr/bin/ to /usr/libexec/ In r266650, we made libatf-c and libatf-c++ private libraries so that no components outside of the source tree could unintendedly depend on them. This change does the same for the "atf-sh library" by moving the atf-sh interpreter from its public location in /usr/bin/ to the private location in /usr/libexec/. Our build system will ensure that our own test programs use the right binary, but users won't be able to depend on atf-sh by "mistake". Committing this now to ride the UPDATING notice added with r267172 today. r268445: Fix atf-sh's integration_test With the move of atf-sh into /usr/libexec in r267181, some of the tests in the integration_test program broke because they could not execute atf-sh from the path any longer. This slipped through because I do have a local atf installation in my home directory that appears in my path, hence the tests could still execute my own version. Fix this by forcing /usr/libexec to appear at the beginning of the path when attempting to execute atf-sh. To make upgrading easy (and to avoid an unnecessary entry in UPDATING), make integration_test depend on the Makefile so that a rebuild of the shell script is triggered. This requires a hack in the *.test.mk files to ensure the Makefile is not treated as a source to the generated program. Ugly, I know, but I don't have a better way of doing this at the moment. Will think of one once I address the TODO in the *.test.mk files that suggests generalizing the file generation functionality. PR: 191052 Reviewed by: Garrett Cooper
* MFC r270803:kib2014-09-011-0/+4
| | | | Document the whole settings needed to build a debug version of rtld.
* MFC r266650, r267172 (both by jmmv):ngie2014-08-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r266650: Change libatf-c and libatf-c++ to be private libraries. We should not be leaking these interfaces to the outside world given that it's much easier for third-party components to use the devel/atf package from ports. As a side-effect, we can also drop the ATF pkgconfig and aclocal files from the base system. Nothing in the base system needs these, and it was quite ugly to have to get them installed only so that a few ports could build. The offending ports have been fixed to depend on devel/atf explicitly. Reviewed by: bapt r267172: Homogenize libatf-* version numbers with upstream. The libatf-* major version numbers in FreeBSD were one version ahead of upstream because, when atf was first imported into FreeBSD, the upstream numbers were not respected. This is just confusing and bound to cause problems down the road. Fix this by taking advantage of the fact that libatf-* are now private and that atf is not yet built by default. However, and unfortunately, a clean build is needed for tests to continue working once "make delete-old-libs" has been run; hence the note in UPDATING. Phabric: D701 Approved by: jmmv (maintainer, mentor)
* MFC r270256:pfg2014-08-281-2/+2
| | | | | | Always check the limits of array index variables before using them. Obtained from: DragonFlyBSD
* MFH (r263160): remove lukemftpddes2014-08-235-431/+0
|
* MFC r265456, r265578:markj2014-08-072-1/+17
| | | | | | | | Add a postinit debugger hook to rtld. This will be used by dtrace(1) to halt the victim process before its entry point is called, at which point probes and DOF data are registered with the kernel. The r_debug_state hook cannot be used for this purpose, as it is called before the program's init routines are invoked and in particular before DOF data is registered (via drti.o).
* MFC r268979:delphij2014-07-291-0/+2
| | | | | | | | | | | Don't save entropy inside jails. As of r126744, we no longer feed the entropy device in jails upon start, and collecting them is no longer useful. PR: conf/126744 Submitted by: Eugene Grosbein <eugen grosbein net> (with minor changes) Approved by: so (des)
* MFC r260913,266895:nwhitehorn2014-06-081-2/+5
| | | | | | | | | | Add a new flag to /etc/ttys: onifconsole. This is equivalent to "on" if the device is an active kernel console and "off" otherwise. This is designed to allow serial-booting x86 systems to provide a login prompt on the serial line by default without providing one on all systems by default. Set this flag on x86 systems for ttyu0. Comments and suggestions by: grehan, dteske, jilles
* MFC r266609:kib2014-06-071-1/+15
| | | | Change the _rtld_atfork() to lock the bind lock in write mode.
* MFC r266411:kib2014-05-251-3/+3
| | | | Fix LD_LIBMAP.
* MFC r264617:ghelmer2014-05-051-0/+6
| | | | | | | | Fix releasing the lock in the parent atrun process after the queue directory has been processed. Otherwise, a long-running child process caused other atrun invocations to stall unnecessarily. Submitted by: J.R. Oldroyd jr at opal.com
* MFC r264481:kib2014-04-211-0/+43
| | | | | Add dwarf annotations to the amd64 _rtld_bind_start to allow debuggers to unwind around the calls from PLT to binder.
* MFC refactoring of the *.test.mk files.jmmv2014-04-141-1/+1
| | | | | | | | | - r263161 Make bsd.test.mk the only public mk fragment for the building of tests. - r263172 Move FreeBSD Test Suite-specific code to a suite.test.mk file. - r263204 Add some documentation for bsd.test.mk. - r263217 Document support for TAP-compliant Perl test programs. This is "make tinderbox" clean.
* MFC: r263121brueffer2014-03-271-13/+12
| | | | | | | | | | | | Re-format the license to conform to our BSD license template as much as possible. This does not change the wording in any way. Remove the 3rd clause ("advertising clause") of the BSD license as permitted by the University of Berkeley on July 22, 1999. While the clause itself mentions Lawrence Berkeley Laboratory, UCB is the sole copyright holder of this file. Reviewed by: imp, emaste, eadler
* MFC r262277:davidxu2014-02-271-7/+5
| | | | | | | | | | | | | | | | | | malloc_aligned() may not leave enough space for pointer to allocated memory, saving the pointer will overwrite bytes belongs to another memory block unexpectly, to fix the problem, use (allocated address + sizeof(void *)) as initial value, and slip to next aligned address, so maximum extra bytes is sizeof(void *) + align - 1. Tested by: Andre Albsmeier < mail at ma17 dot ata dot myota dot orgndre > MFC r262334: Increase alignment to size of pointer if the alignment is too small. Some modules do not align data at least to size of pointer, they uses a smaller alignment, but our pointer should be aligned to its native boundary, otherwise on some platforms, hardware alignment checking will cause bus error.
* MFC: r262136brueffer2014-02-2455-275/+55
| | | | | | | Remove the 3rd clause ("advertising clause") of the BSD license as permitted by the University of Berkeley on July 22, 1999. Reviewed by: imp
* MFC: r262135brueffer2014-02-244-0/+8
| | | | Add $FreeBSD$.
* MFC: r261885brueffer2014-02-211-0/+2
| | | | | | | | | In sgetpwnam(), save and free pw_class like all other char members of struct passwd. This fixes spurious "login_getclass: unknown class" errors. PR: 186439 Submitted by: UEMURA Tetsuya <t_uemura at macome.co.jp>
OpenPOWER on IntegriCloud