summaryrefslogtreecommitdiffstats
path: root/libexec
Commit message (Collapse)AuthorAgeFilesLines
* Follow r293066 adding a generalized exec hook for RISC-V as well.br2016-01-231-0/+2
|
* Fix initlist_add_object invocation parameters.kan2016-01-201-3/+3
| | | | | | The tail parameter should point to the last object for which dependencies should be processed. In most cases, this is the object itself.
* Do not call callbacks for dl_iterate_phdr(3) with the rtld bind andkib2016-01-2011-105/+182
| | | | | | | | | | | | | | | | | | phdr locks locked. This allows to call rtld services from the callback, which is only reasonable for dlopen(path, RTLD_NOLOAD) to test existence of the library in the image, and for dlsym(). The later might still be not quite safe, due to the lazy resolution of filters. To allow dropping the locks around iteration in dl_iterate_phdr(3), we insert markers to track current position between relocks. The global objects list is converted to tailq and all iterators skip markers, globallist_next() and globallist_curr() helpers are added. Reported and tested by: davide Reviewed by: kan Sponsored by: The FreeBSD Foundation MFC after: 3 weeks
* Restore ABI variants now that ldconfig groks -soft. In addition, as aimp2016-01-183-7/+16
| | | | | | | transition mechanism, if we don't have /usr/libsoft, assume that soft float ABI binaries are the default, so treat them as default binaries. When we've fully transitioned, it will make no sense to do this stat, and it will be removed.
* Remove the compat code to handle the kernel passing us an unalingedandrew2016-01-131-7/+1
| | | | | | | | stackpointer. Userland expects the kernel to pass it an aligned sp and pass a pointer to the arguments in x0. The kernel side was updated in r289502, 3 months ago. Sponsored by: ABT Systems Ltd
* Revert r293201, r293202 (rtld: populate DT_DEBUG iff DYNAMIC segment is ↵emaste2016-01-082-5/+2
| | | | | | | | | | writable) It turns out MIPS binaries may have other oddities that can trigger a fault at startup. PR: 206017 Reported by: ray
* Disable abi variant hook until strangeness with packages can be sortedimp2016-01-051-1/+1
| | | | out.
* rtld: populate DT_DEBUG iff DYNAMIC segment is writableemaste2016-01-051-0/+1
| | | | rtld.h was accidentally missed in r293201
* rtld: populate DT_DEBUG iff DYNAMIC segment is writableemaste2016-01-051-2/+4
| | | | | | | | | | | | | | | | | MIPS has/had a read-only DYNAMIC segment, and uses an extra level of indirection (through MIPS_RLD_MAP) to locate the debugger rendezvous data. Some linkers (e.g. LLVM's lld) may produce MIPS binaries with a writable DYNAMIC segment, which would allow us to eventually drop a special case. Therefore, instead of hardcoding knowledge that DYNAMIC is not writable on MIPS just check the permissions on the segment. Reviewed by: kib MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D4791
* rtld: wrap a comment to 80 columnsemaste2016-01-051-2/+2
|
* If md_exec_hook is defined, provide a way to create the stringsimp2016-01-031-2/+18
| | | | | | | for the environment variables we look up at runtime. Otherwise, there's no way they will change, optimize it at compile time. Differential Review: https://reviews.freebsd.org/D2718
* Create a generalized exec hook that different architectures can hookimp2016-01-0311-3/+63
| | | | | | into if they need to, but default to no action. Differential Review: https://reviews.freebsd.org/D2718
* Unify the ELFv1 and ELFv2 code paths and make ELFv1 (the normal ABI) morenwhitehorn2016-01-012-39/+33
| | | | | | correct in the process. MFC after: 2 weeks
* Use a macro to create the names for the library path names. This willimp2015-12-272-23/+26
| | | | | | | allow later substitution at run time instead of compile time of the environment variable name prefix. Differential Review: https://reviews.freebsd.org/D2718
* rtld: remove old XXX comment missed in r35529emaste2015-12-241-1/+0
| | | | Sponsored by: The FreeBSD Foundation
* Add support for RISC-V architecture.br2015-12-244-1/+641
| | | | | | | Reviewed by: andrew, kib Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Differential Revision: https://reviews.freebsd.org/D4679
* rtld: Use common NT_FREEBSD_* note types introduced in r291909emaste2015-12-211-4/+4
| | | | Sponsored by: The FreeBSD Foundation
* Use variable names that aren't as prone to dyslexic confusion.imp2015-12-181-2/+2
| | | | Suggested by: jmallet@
* Fix LDADD/DPADD that should be LIBADD.bdrewery2015-12-041-2/+1
| | | | Sponsored by: EMC / Isilon Storage Division
* Follow-on to r291666: use -ffreestanding instead of -fno-builtin.nwhitehorn2015-12-031-1/+1
| | | | Requested by: kib
* Provide support for ELFv2 userland if using a newer compiler (recent clangnwhitehorn2015-12-034-10/+70
| | | | or gcc) and binutils >= 2.24. Not enabled by default.
* Fix build on GCC 5.2 where, at least on PPC64, the compiler would "optimize"nwhitehorn2015-12-031-2/+1
| | | | | | | | the malloc() + memset() in the local implementation of calloc() into a call to calloc(), helpfully turning it into an infinite loop. Clean up some unneeded flags on PPC64 while here. MFC after: 1 month
* Fix build after r291620.bdrewery2015-12-011-1/+1
| | | | | | | | | | | "don't know how to make /Versions.def. Stop" This was trying to define a target in bsd.symver.mk based on LIBCDIR which was not yet defined. Switching the order of inclusion of bsd.prog.mk and bsd.symver.mk fixes it and seems fine. Pointyhat to: bdrewery Sponsored by: EMC / Isilon Storage Division
* Don't override LIB*DIR variables from src.libnames.mk.bdrewery2015-12-011-4/+2
| | | | | | | | In some cases switch to the LIB*SRCDIR value. These recently were defined in r291327 and r291619. Sponsored by: EMC / Isilon Storage Division
* META MODE: Update dependencies with 'the-lot' and add missing directories.bdrewery2015-12-018-0/+129
| | | | | | | | | | | | | | This is not properly respecting WITHOUT or ARCH dependencies in target/. Doing so requires a massive effort to rework targets/ to do so. A better approach will be to either include the SUBDIR Makefiles directly and map to DIRDEPS or just dynamically lookup the SUBDIR. These lose the benefit of having a userland/lib, userland/libexec, etc, though and results in a massive package. The current implementation of targets/ is very unmaintainable. Currently rescue/rescue and sys/modules are still not connected. Sponsored by: EMC / Isilon Storage Division
* Update dependencies after r291406 added libelf to libkvm.bdrewery2015-12-011-0/+1
| | | | | | | | Unfortunately filemon/meta mode tracks all indirect dependencies here since ld(1) is reading libelf when linking in libkvm. Churn would be reduced if this was able to be limited to direct dependencies. Sponsored by: EMC / Isilon Storage Division
* Use LIBEXECDIR for /usr/libexec.bdrewery2015-11-263-3/+3
| | | | | MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
* META MODE: These need object directories to handle staging.bdrewery2015-11-261-1/+0
| | | | Sponsored by: EMC / Isilon Storage Division
* META MODE: Don't create .meta files when symlinking sources into the obj ↵bdrewery2015-11-252-4/+4
| | | | | | | | | | | directory. Tracking these leads to situations where meta mode will consider the file to be out of date if /bin/sh or /bin/ln are newer than the source file. There's no reason for meta mode to do this as make is already handling the rebuild dependency fine. Sponsored by: EMC / Isilon Storage Division
* Remove unneeded libutil dependency for sendmail.bdrewery2015-11-242-2/+0
| | | | | | | | | It included libutil.h for setproctitle(3), which was moved from libutil to libc in r65353 in 2000. Reviewed by: gshapiro [sendmail change] Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D4261
* Rather than using the #define for path names, indirect through a char *imp2015-10-313-9/+24
| | | | variable that could change for different executable types detected.
* Move all the paths into a new path.h to centralize them.imp2015-10-315-33/+67
|
* Add Makefile.dependbdrewery2015-10-272-0/+50
|
* Allow PT_NOTES segments to be located anywhere in the executablekib2015-10-141-3/+21
| | | | | | | | | | | | image. The dynamic linker still requires that program headers of the executable or dso are mapped by a PT_LOAD segment. Reviewed by: emaste, jhb Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D3871
* Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) andngie2015-10-125-13/+4
| | | | | | | | | | | | 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 MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Divison
* Use existing CONFDIR instead of adding a new CONFIGDIRbapt2015-10-111-1/+1
| | | | Reported by: jbeich
* Update Dragonfly Mail Agent to v0.10bapt2015-10-101-1/+1
|
* Install bsd.confs.mkbapt2015-10-101-1/+1
| | | | Rename ETCDIR into CONFIGDIR to avoid conflicts with the ports tree
* Rename the dma directory into dmagent to avoid collision on unclean ojectbapt2015-10-094-1/+1
| | | | directory where an old dma binary can remain
* Add missing Makefilebapt2015-10-091-0/+6
|
* Move all the dma(8) components into one single directorybapt2015-10-097-29/+96
| | | | | | | Simplifying maintainance and options (only one place to deal with MK_DMAGENT) This also makes packaging base less intrusive by getting a single point where to add tags.
* Remove some trailing space.kan2015-10-091-5/+5
|
* Annotate arm userspace assembler sources stating their tolerance tokib2015-09-291-0/+1
| | | | | | | the non-executable stack. Reviewed by: andrew Sponsored by: The FreeBSD Foundation
* META_MODE: Remove DEP_MACHINE from Makefile.depend files.bdrewery2015-09-251-2/+0
| | | | | | This has not been needed since r246865 in projects/bmake. Sponsored by: EMC / Isilon Storage Division
* META_MODE: Remove DEP_RELDIR from Makefile.depend files.bdrewery2015-09-251-2/+0
| | | | | | This has not been needed since r284171 in projects/bmake. Sponsored by: EMC / Isilon Storage Division
* META_MODE: No need to fix the link in this case.bdrewery2015-09-181-1/+1
| | | | | | | | | | | The exists(${DESTDIR}...) check runs with DESTDIR being blank. When the target runs it does have DESTDIR=${STAGE_OBJTOP} via bsd.sys.mk. This results in the first execution warning that the symlink is missing. The second run does run fine. However, this chflags is not needed at all for META_MODE/STAGING since we never had this path being a schg file while using META_MODE. Sponsored by: EMC / Isilon Storage Division
* Fix how we place each objects thread local data. The code used was basedandrew2015-09-012-4/+4
| | | | | | | | | | | | | | | | | | | on the Variant II code, however arm64 uses Variant I. The former placed the thread pointer after the data, pointing at the thread control block, while the latter places these before said data. Because of this we need to use the size of the previous entry to calculate where to place the current entry. We also need to reserve 16 bytes at the start for the thread control block. This also fixes the value of TLS_TCB_SIZE to be correct. This is the size of two unsigned longs, i.e. 2 * 8 bytes. While here remove the bogus adjustment of the pointer in the R_AARCH64_TLS_TPREL64 case. It should be the offset of the data relative to the thread pointer, including the thread control block. Sponsored by: ABT Systems Ltd
* Ensure we use calculate_first_tls_offset, even if the main program doesn'tandrew2015-09-011-1/+1
| | | | | | | | | | | | | | | | | | 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
* Don't assign 'ptr' without using it.delphij2015-08-301-1/+0
| | | | | Reported by: clang static analyzer MFC after: 2 weeks
* Upgrade libxo to 0.4.5.marcel2015-08-241-1/+1
| | | | | | | Local changes incorporated by 0.4.5: r284340 Local changes retained: r276260, r282117 Obtained from: https://github.com/Juniper/libxo
OpenPOWER on IntegriCloud