summaryrefslogtreecommitdiffstats
path: root/libexec/rtld-elf/libmap.c
Commit message (Collapse)AuthorAgeFilesLines
* rtld: Fix fd leak with parallel dlopen and fork/exec.jilles2012-11-041-1/+1
| | | | | | | | | | | | | | | | Rtld did not set FD_CLOEXEC on its internal file descriptors; therefore, such a file descriptor may be passed to a process created by another thread running in parallel to dlopen() or fdlopen(). No other threads are expected to be running during parsing of the hints and libmap files but the file descriptors need not be passed to child processes so add O_CLOEXEC there as well. This change will break fdlopen() (as used by OpenPAM) on kernels without F_DUPFD_CLOEXEC (added in July). Note that running new userland on old kernels is not supported. Reviewed by: kib
* open the resolved pathbapt2012-05-051-4/+4
| | | | | | | fix debug message Submitted by: John Marino <draco@marino.st> Approved by: des (mentor)
* Add two special directives to libmap.conf:bapt2012-04-301-30/+132
| | | | | | | | | | | | | | | include <file>: Parse the contents of file before continuing with the current file. includedir <dir>: Parse the contents of every file in dir that ends in .conf before continuing with the current file. Any file or directory encountered while processing include or includedir directives will be parsed exactly once, even if it is encountered multiple times. Reviewed by: kib, des Approved by: des (mentor) MFC after: 1 month
* Rtld on diet 3.kib2012-03-141-3/+3
| | | | | | | | | | | | | | Stop using strerror(3) in rtld, which brings in msgcat and stdio. Directly access sys_errlist array of errno messages with private rtld_strerror() function. Now, $ size /libexec/ld-elf.so.1 text data bss dec hex filename 96983 2480 8744 108207 1a6af /libexec/ld-elf.so.1 Reviewed by: dim, kan MFC after: 2 weeks
* Rtld on diet part 2:kib2012-03-121-72/+76
| | | | | | | | Do not use stdio for libmap.conf read. Directly map the file and parse lines from the mappings. Reviewed by: kan MFC after: 3 weeks
* Cosmetic nit:pluknet2012-03-061-10/+10
| | | | | | - rename isspace1() macro to the more appropriate rtld_isspace(). Discussed with: kib
* The libmap.conf initialization is performed before TLS is functional.kib2012-03-051-10/+15
| | | | | | | | | | | | | Since after r232498 the ctype macros require working access to thread-local variables, rtld crashes when libmap.conf is present. Use hand-made isspace1() macro which is enough to detect spaces in libmap.conf. Reported by: alc, lme, many on current@ Tested by: lme Reviewed by: dim, kan MFC after: 1 week
* Fix a malloc overrun in 32-bit compat libmap lookup code.peter2006-01-311-6/+4
|
* Description from Dan:mdodd2005-02-041-10/+75
| | | | | | | | | | | | | | | 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
|
* 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
* Add initial support for compiling a special 32 bit version ofpeter2004-03-211-4/+28
| | | | | | | 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.
* Fix "warning: value computed is not used".fjoe2004-02-031-1/+1
| | | | Found by: gcc 2.95.4 [FreeBSD]
* Change libmap.c:lm_init() to return a status value; 0 for successmdodd2003-09-131-3/+3
| | | | | | | | (libmap available) and 1 for failure. Assign this return to the global 'libmap_disable' variable in rtld.c. This totally prevents any libmap functions from being called after lm_init() if no config file is present.
* Include libmap.h for prototypes.mdodd2003-06-181-0/+1
|
* Provide function entry debugging messages.mdodd2003-05-311-1/+16
|
* Don't post-increment pointers inside a loop conditional.mdodd2003-05-301-11/+11
| | | | | | | | | | | While I'm here: - Let lm_add() call strdup() on its own behalf. - Use a temporary pointer when parsing constraints; only set the constraint pointer on a totally successful match. PR: bin/52783 Submitted by: David P. Reese Jr. <daver@gomerbud.com> Approved by: re (rwatson)
* Allow threading libraries to register their own lockingkan2003-05-291-6/+3
| | | | | | | | | | 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)
* - Use xmalloc() and xstrdup() instead of malloc() and strdup().mdodd2003-05-191-5/+14
| | | | | | - Add a global mapping if we have a successful constrained match. Approved by: re
* Remove redundant strlen checks, do not check the samekan2003-04-301-23/+24
| | | | symbol twice.
* Code cleanups and sanity checking for config file parser.mdodd2003-04-101-19/+52
|
* Dynamic object dependency mapping: libmap.mdodd2003-04-071-0/+199
This is an optional feature, disabled by default. This will be useful to people testing the various POSIX threading libraries under -CURRENT but can easily serve other needs.
OpenPOWER on IntegriCloud