| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
Properly terminate the result string for intermediate results.
Notes:
svn path=/stable/9/; revision=250170
|
| |
|
|
|
|
|
|
| |
Rewrite origin_subst_one() to get rid of the wrong limit on the length
of the resulting string.
Notes:
svn path=/stable/9/; revision=250040
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Map libraries linked with -Ttext-segment=base_addr at base_addr.
Normal libraries have base address 0 and are unaffected by this change.
PR: 176216
Submitted by: Damjan Jovanovic <damjan.jov@gmail.com>
Reviewed by: kib
Notes:
svn path=/stable/9/; revision=247846
|
| |
|
|
|
|
|
| |
mdoc: Only use macros inside a reference block.
Notes:
svn path=/stable/9/; revision=247650
|
| |
|
|
|
|
|
| |
Mark tftp_log() as __printflike() and deal with the fallout.
Notes:
svn path=/stable/9/; revision=247644
|
| |
|
|
|
|
|
| |
Spelling fixes for libexec/
Notes:
svn path=/stable/9/; revision=247641
|
| |
|
|
|
|
|
| |
Fix warnings found by -Wmising-variable-declarations.
Notes:
svn path=/stable/9/; revision=247638
|
| |
|
|
|
|
|
| |
Properly use LDADD & DPADD to link against libwrap.
Notes:
svn path=/stable/9/; revision=247637
|
| |
|
|
|
|
|
|
|
| |
Since clang 3.2 now has an option to suppress warnings about implicitly
promoted K&R parameters, remove the workarounds added for sendmail
components in r228558.
Notes:
svn path=/stable/9/; revision=247333
|
| |
|
|
|
|
|
|
|
|
|
| |
Use correct size in snprintf.
Remove unused buffer.
PR: 174631
Submitted by: Henning Petersen
Notes:
svn path=/stable/9/; revision=246253
|
| |
|
|
|
|
|
|
|
|
|
|
| |
atrun(8): scale default load average limit with the number of CPUs
Previously atrun refused to run jobs if load average was not below fixed limit of 1.5.
PR: 173175
Approved by: trasz (mentor)
Notes:
svn path=/stable/9/; revision=242990
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Check the return error of set[e][ug]id. While this can never fail in the
current version of FreeBSD, this isn't guarenteed by the API.
Custom security modules, or future implementations of the setuid and
setgid may fail.
Approved by: cperciva (implicit)
Notes:
svn path=/stable/9/; revision=242166
|
| |
|
|
|
|
|
|
|
|
|
| |
The reserved space for fmt was exactly sufficient for a two-digit value of
MAXLOGNAME - 1.
PR: bin/171815
Submitted by: Jeremy Huddleston Sequoia
Notes:
svn path=/stable/9/; revision=241226
|
| |
|
|
|
|
|
| |
Improve file rotation
Notes:
svn path=/stable/9/; revision=241205
|
| |
|
|
|
|
|
|
|
|
| |
Do not reference z_nodeflib for !objgiven case, thus fixing LD_PRELOAD
for a non-absolute path.
PR: bin/171604
Notes:
svn path=/stable/9/; revision=240801
|
| |
|
|
|
|
|
|
|
|
| |
Bump date missed in r202756
PR: docs/171624
Approved by: cperciva (implicit)
Notes:
svn path=/stable/9/; revision=240582
|
| |
|
|
|
|
|
|
|
|
|
| |
Implement DT_RUNPATH and -z nodefaultlib.
MFC note: The ld_library_path_rpath default value was flipped to true,
effectively reverting rtld back to the pre-patch behaviour, unless
LD_LIBRARY_PATH_RPATH environment variable is set and its value is 0/N/n.
Notes:
svn path=/stable/9/; revision=240308
|
| |
|
|
|
|
|
|
|
|
|
| |
The place where the function is called can be reached if object loading
and relocation fails too, in which case obj pointer will be NULL. Do not
call process_nodelete then, or crash will follow.
Pointy hat to: kan
Notes:
svn path=/stable/9/; revision=239471
|
| |
|
|
|
|
|
|
|
|
| |
fully loaded.
Trying to up the reference from the load loop risks missing
dependencies that have not been loaded yet.
Notes:
svn path=/stable/9/; revision=239439
|
| |
|
|
| |
Notes:
svn path=/stable/9/; revision=239435
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
A number of tftp clients, including the one in Intel's pxe boot loader,
may intentionally stop a transfer using error code 0 (i.e., EUNDEF).
These are not real errors. Avoid spamming log files with these by
logging them at level LOG_DEBUG instead.
Discussed on -hackers with an initial patch proposal; this change is an
improved approach suggested by kan@.
Notes:
svn path=/stable/9/; revision=239432
|
| |
|
|
|
|
|
|
|
|
|
| |
MFH r236892: remove mention of auth.conf from programs that don't use it
MFH r236963: remove dead code relating to auth.conf
MFH r236965 r236966 r236967 r237005 r237006 r237011: retire auth.conf
Approved by: re
Notes:
svn path=/stable/9/; revision=238481
|
| |
|
|
|
|
|
|
|
|
| |
Ensure that for the object which is a dependency for some filtee,
relocations are performed before the object's initializer is called.
Approved by: re (kensmith)
Notes:
svn path=/stable/9/; revision=238133
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Eliminate the static buffer used to read the first page of the mapped
object, and eliminate the pread(2) call as well. Mmap the first
page of the object temporaly, and unmap it on error or last use.
Potentially, this leaves one-page gap between succeeding dlopen(3),
but there are other mmap(2) consumers as well.
Fix several cases were the whole mapping of the object leaked on error.
Use MAP_PREFAULT_READ for mmap(2) calls which map real object pages
Notes:
svn path=/stable/9/; revision=237712
|
| |
|
|
|
|
|
|
|
|
| |
Add thread-local storage support for ARM to rtld-elf
Reviewed by: cognet
Obtained from: NetBSD
Notes:
svn path=/stable/9/; revision=237394
|
| |
|
|
|
|
|
|
|
| |
Remove trailing whitespace per mdoc lint warning
Approved by: cperciva (implicit)
Notes:
svn path=/stable/9/; revision=237216
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add two special directives to libmap.conf:
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.
Approved by: des (mentor)
Notes:
svn path=/stable/9/; revision=236523
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Split the symlook_obj1 into a loop iterating over the ELF object symbol
hash elements, and a helper matched_symbol() which match the given hash
entry and request, performing needed type and version checks.
MFC r234841:
Add GNU hash support for rtld.
MFC r235054:
Work around a situation where symlook_obj() could be called for the
object for which digest_dynamic1() was not done yet. Just return
EINVAL and do not try to dereference NULL buckets hash array.
Notes:
svn path=/stable/9/; revision=235396
|
| |
|
|
|
|
|
|
|
|
| |
Propagate the current state of rtld_bind_lock to dlopen_object() calls
through the filter loading call chain. This fixes attempts to
write-lock the already locked rtld_bind_lock when filter loading is
initiated by relocation of dlopening dso.
Notes:
svn path=/stable/9/; revision=234454
|
| |
|
|
|
|
|
| |
Properly handle absent AT_CANARY aux entry.
Notes:
svn path=/stable/9/; revision=234012
|
| |
|
|
|
|
|
|
| |
Remove libssp_nonshared from the rtld linking set. The only use for the
library was definition for the weak alias of __stack_chk_fail.
Notes:
svn path=/stable/9/; revision=233987
|
| |
|
|
|
|
|
| |
Provide short-circuit exit(3) implementation for rtld.
Notes:
svn path=/stable/9/; revision=233986
|
| |
|
|
|
|
|
| |
Remove superfluous extern keywords.
Notes:
svn path=/stable/9/; revision=233935
|
| |
|
|
|
|
|
| |
Centralize the calculation of the top source directory.
Notes:
svn path=/stable/9/; revision=233934
|
| |
|
|
|
|
|
|
| |
Implement xstrdup() using strlen()/xmalloc()/memcpy() already
presented in rtld, instead of pulling in libc strdup().
Notes:
svn path=/stable/9/; revision=233933
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use xmalloc() instead of malloc() in the places where malloc() calls
are assumed to not fail.
Make the xcalloc() calling conventions follow the calloc(3) calling
conventions and replace unchecked calls to calloc() with calls to
xcalloc().
Remove redundand declarations from xmalloc.c, which are already
present in rtld.h.
Notes:
svn path=/stable/9/; revision=233922
|
| |
|
|
|
|
|
| |
Remove the fragments which are not needed on FreeBSD.
Notes:
svn path=/stable/9/; revision=233921
|
| |
|
|
|
|
|
|
|
|
| |
Add a special case in do_dlsym() for TLS stored symbols.
MFC r233674:
Fix ia64 build after r233655.
Notes:
svn path=/stable/9/; revision=233833
|
| |
|
|
|
|
|
|
| |
Prevent rtld_verify_object_versions() from being called several times
for the same object.
Notes:
svn path=/stable/9/; revision=233832
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix several problems with our ELF filters implementation.
Do not relocate twice an object which happens to be needed by loaded
binary (or dso) and some filtee opened due to symbol resolution when
relocating need objects. Record the state of the relocation
processing in Obj_Entry and short-circuit relocate_objects() if
current object already processed.
Do not call constructors for filtees loaded during the early
relocation processing before image is initialized enough to run
user-provided code. Filtees are loaded using dlopen_object(), which
normally performs relocation and initialization. If filtee is
lazy-loaded during the relocation of dso needed by the main object,
dlopen_object() runs too earlier, when most runtime services are not
yet ready.
Postpone the constructors call to the time when main binary and
depended libraries constructors are run, passing the new flag
RTLD_LO_EARLY to dlopen_object(). Symbol lookups callers inform
symlook_* functions about early stage of initialization with
SYMLOOK_EARLY. Pass flags through all functions participating in
object relocation.
Use the opportunity and fix flags argument to find_symdef() in
arch-specific reloc.c to use proper name SYMLOOK_IN_PLT instead of
true, which happen to have the same numeric value.
MFC r233777 (by kan):
Do not try to adjust stacks if dlopen_object is called too early.
MFC r233778 (by kan):
Remove extra blank line from revious commit.
MFC note: the ARM and MIPS TLS support is not merged back, so the chunks
from r233231 which fix misuse of flags in calls to find_symdef() in
the corresponding relocation type handlers were not applied. When TLS
support is merged, the rest of r233231 should be applied too.
Notes:
svn path=/stable/9/; revision=233831
|
| |
|
|
|
|
|
|
|
| |
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.
Notes:
svn path=/stable/9/; revision=233697
|
| |
|
|
|
|
|
|
| |
Do not use stdio for libmap.conf read. Directly map the file and
parse lines from the mappings.
Notes:
svn path=/stable/9/; revision=233696
|
| |
|
|
|
|
|
|
|
| |
Provide rtld-private implementations of __stack_chk_guard,
__stack_chk_fail() and __chk_fail() symbols, to be used by functions
linked from libc_pic.a.
Notes:
svn path=/stable/9/; revision=233695
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add support for preinit, init and fini arrays to rtld.
Only binaries marked with proper ABI note gets array ctr/dtrs called.
MFC r232856:
When iterating over the dso program headers, the object is not initialized
yet, and object segments are not yet mapped. Only parse the notes that
appear in the first page of the dso (as it should be anyway), and use
the preloaded page content.
MFC r232857 (by dim):
Fix a warning/error with clang.
MFC r232859 (by dim):
Amend r232857, now dropping the casts entirely, as they were not
necessary at all.
Notes:
svn path=/stable/9/; revision=233694
|
| |
|
|
|
|
|
| |
Remove write-only variable.
Notes:
svn path=/stable/9/; revision=233170
|
| |
|
|
|
|
|
| |
Optimize tls_get_addr_common().
Notes:
svn path=/stable/9/; revision=233063
|
| |
|
|
|
|
|
| |
Remove the use of toupper() from rtld_printf.c.
Notes:
svn path=/stable/9/; revision=233029
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Define several extra macros in bsd.sys.mk and sys/conf/kern.pre.mk, to
get rid of testing explicitly for clang (using ${CC:T:Mclang}) in
individual Makefiles.
Instead, use the following extra macros, for use with clang:
- NO_WERROR.clang (disables -Werror)
- NO_WCAST_ALIGN.clang (disables -Wcast-align)
- NO_WFORMAT.clang (disables -Wformat and friends)
- CLANG_NO_IAS (disables integrated assembler)
- CLANG_OPT_SMALL (adds flags for extra small size optimizations)
As a side effect, this enables setting CC/CXX/CPP in src.conf instead of
make.conf! For clang, use the following:
CC=clang
CXX=clang++
CPP=clang-cpp
Notes:
svn path=/stable/9/; revision=232930
|
| |
|
|
|
|
|
|
|
|
|
| |
Use hand-made isspace1() macro which is enough to detect spaces in
libmap.conf.
MFC r232590 (by pluknet):
Rename isspace1() macro to the more appropriate rtld_isspace().
Notes:
svn path=/stable/9/; revision=232863
|
| |
|
|
|
|
|
|
|
|
| |
Add missed EOL when die() was converted to use rtld_fdputstr() instead
of errx().
PR: bin/165075
Notes:
svn path=/stable/9/; revision=231820
|