<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/libexec/rtld-elf/amd64, branch releng/10.2</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=releng%2F10.2</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=releng%2F10.2'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2015-04-12T06:45:40Z</updated>
<entry>
<title>MFC r280816:</title>
<updated>2015-04-12T06:45:40Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2015-04-12T06:45:40Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=df043ea3b129c61608b141025365809ee5351563'/>
<id>urn:sha1:df043ea3b129c61608b141025365809ee5351563</id>
<content type='text'>
Change default visibility for rtld to hidden, on x86.
</content>
</entry>
<entry>
<title>MFC r270798:</title>
<updated>2014-09-12T16:22:01Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2014-09-12T16:22:01Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=36b9190bd1d13ee0436ee2f6b0d51493027c80a8'/>
<id>urn:sha1:36b9190bd1d13ee0436ee2f6b0d51493027c80a8</id>
<content type='text'>
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)
</content>
</entry>
<entry>
<title>MFC r264481:</title>
<updated>2014-04-21T02:55:27Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2014-04-21T02:55:27Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=293daf8ab1191c0851291c52b731c157e727829f'/>
<id>urn:sha1:293daf8ab1191c0851291c52b731c157e727829f</id>
<content type='text'>
Add dwarf annotations to the amd64 _rtld_bind_start to allow debuggers
to unwind around the calls from PLT to binder.
</content>
</entry>
<entry>
<title>Add GNU hash support for rtld.</title>
<updated>2012-04-30T13:31:10Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2012-04-30T13:31:10Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=f62651920d526d8ef7a8ea66487e5bd1814a7a6f'/>
<id>urn:sha1:f62651920d526d8ef7a8ea66487e5bd1814a7a6f</id>
<content type='text'>
Based on dragonflybsd support for GNU hash by John Marino &lt;draco marino st&gt;
Reviewed by:	kan
Tested by:	bapt
MFC after:	2 weeks
</content>
</entry>
<entry>
<title>Fix several problems with our ELF filters implementation.</title>
<updated>2012-03-20T13:20:49Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2012-03-20T13:20:49Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=082f959ac8281d323f9289c45b769275e172c917'/>
<id>urn:sha1:082f959ac8281d323f9289c45b769275e172c917</id>
<content type='text'>
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.

Reported and tested by:	theraven
Reviewed by:	kan
MFC after:	2 weeks
</content>
</entry>
<entry>
<title>Add support for preinit, init and fini arrays.  Some ABIs, in</title>
<updated>2012-03-11T20:03:09Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2012-03-11T20:03:09Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=83aa9cc00c2d83d05a0efe7a1496d8aab4a153bb'/>
<id>urn:sha1:83aa9cc00c2d83d05a0efe7a1496d8aab4a153bb</id>
<content type='text'>
particular on ARM, do require working init arrays.

Traditional FreeBSD crt1 calls _init and _fini of the binary, instead
of allowing runtime linker to arrange the calls.  This was probably
done to have the same crt code serve both statically and dynamically
linked binaries.  Since ABI mandates that first is called preinit
array functions, then init, and then init array functions, the init
have to be called from rtld now.

To provide binary compatibility to old FreeBSD crt1, which calls _init
itself, rtld only calls intializers and finalizers for main binary if
binary has a note indicating that new crt was used for linking.  Add
parsing of ELF notes to rtld, and cache p_osrel value since we parsed
it anyway.

The patch is inspired by init_array support for DragonflyBSD, written
by John Marino.

Reviewed by:	kan
Tested by:	andrew (arm, previous version), flo (sparc64, previous version)
MFC after:	3 weeks
</content>
</entry>
<entry>
<title>Remove unneeded dtv variable.</title>
<updated>2012-01-17T21:55:20Z</updated>
<author>
<name>Ed Schouten</name>
<email>ed@FreeBSD.org</email>
</author>
<published>2012-01-17T21:55:20Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=581f58e7a3b6eec8df4a415bfb4cfa7499b66778'/>
<id>urn:sha1:581f58e7a3b6eec8df4a415bfb4cfa7499b66778</id>
<content type='text'>
It is only assigned and not used at all. The object files stay identical
when the variables are removed.

Approved by:	kib
</content>
</entry>
<entry>
<title>_rtld_bind() read-locks the bind lock, and possible plt resolution</title>
<updated>2011-12-14T16:47:53Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2011-12-14T16:47:53Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=5734c46c68e4f5b4edfc00921d02d8b8c973e51c'/>
<id>urn:sha1:5734c46c68e4f5b4edfc00921d02d8b8c973e51c</id>
<content type='text'>
from the dispatcher would also acquire bind lock in read mode, which
is the supported operation. plt is explicitely designed to allow safe
multithreaded updates, so the shared lock do not cause problems.

The error in r228435 is that it allows read lock acquisition after the
write lock for the bind block.  If we dlopened the shared object that
contains IRELATIVE or jump slot which target is STT_GNU_IFUNC, then
possible recursive plt resolve from the dispatcher would cause it.

Postpone the resolution for irelative/ifunc right before initializers
are called, and drop bind lock around calls to dispatcher.  Use
initlist to iterate over the objects instead of the -&gt;next, due to
drop of the bind lock in iteration.

For i386/reloc.c:reloc_iresolve(), fix calculation of the dispatch
function address for dso, by taking into account possible non-zero
relocbase.

MFC after:	3 weeks
</content>
</entry>
<entry>
<title>Add support for STT_GNU_IFUNC and R_MACHINE_IRELATIVE GNU extensions to</title>
<updated>2011-12-12T11:03:14Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2011-12-12T11:03:14Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=6be4b697152616e174e381a763ed2128eafca8a0'/>
<id>urn:sha1:6be4b697152616e174e381a763ed2128eafca8a0</id>
<content type='text'>
rtld on 386 and amd64. This adds runtime bits neccessary for the use
of the dispatch functions from the dynamically-linked executables and
shared libraries.

To allow use of external references from the dispatch function, resolution
of the R_MACHINE_IRESOLVE relocations in PLT is postponed until GOT entries
for PLT are prepared, and normal resolution of the GOT entries is finished.
Similar to how it is done by GNU, IRELATIVE relocations are resolved in
advance, instead of normal lazy handling for PLT.

Move the init_pltgot() call before the relocations for the object are
processed.

MFC after:	3 weeks
</content>
</entry>
<entry>
<title>- change "is is" to "is" or "it is"</title>
<updated>2011-10-16T14:30:28Z</updated>
<author>
<name>Eitan Adler</name>
<email>eadler@FreeBSD.org</email>
</author>
<published>2011-10-16T14:30:28Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=36daf0495aa68d669ac6abf004940ec1b1e83e42'/>
<id>urn:sha1:36daf0495aa68d669ac6abf004940ec1b1e83e42</id>
<content type='text'>
- change "the the" to "the"

Approved by:	lstewart
Approved by:	sahil (mentor)
MFC after:	3 days
</content>
</entry>
</feed>
