Age | Commit message (Collapse) | Author |
|
from Matt Dillon's implementation in DragonFlyBSD commit 7629c631.
One difference is that as long as DT_HASH is still present, ld.so
will use that to get the total number of symbols rather than walking
the GNU hash chains. Note that the GPLv2 binutils we have doesn't
support DT_GNU_HASH, so this only helps archs were lld is used.
ok kettenis@ mpi@
|
|
__got_{start,end} to find a region to mark read-only. It was only used
for binaries that didn't have a GNU_RELRO segment, but all archs have
been using that for over a year. Since support for insecure-PLT layouts
on powerpc and alpha have been removed, all archs handle GNU_RELRO the
same way and the support can be moved from the MD code to the MI code.
ok mpi@
|
|
we're looking up?" logic from _dl_find_symbol_obj() into matched_symbol(), so
that the former is just the "iterate across the hash" logic.
matched_symbol() returns zero on "not found", one on "found strong
symbol", and negative one on "found weak symbol". The last of those lets
the caller give up on this object after finding a weak symbol, as there's
no point in continuing to search for a strong symbol in the same object.
ok mpi@
|
|
the return pointers into a structure and pass that to _dl_find_symbol_obj().
Set sl->sl_obj_out in _dl_find_symbol_obj() so that the callers don't
need to each record the object.
ok mpi@
|
|
ok millert@
|
|
ok patrick@, millert@
|
|
simply exiting, via helper functions _dl_die(), _dl_diedie(), and
_dl_oom().
prompted by a complaint from jsing@
ok jsing@ deraadt@
|
|
|
|
|
|
problem reported by semarie@
|
|
ok kettenis@
|
|
ok kettenis@
|
|
Don't skip DT_INIT and DT_FINI for the main executable. This matches what
Linux and Solaris do.
ok guenther@
|
|
range instead of the [__got_start, __got_end) range.
On many archs this will cover _DYNAMIC too, so move up the DT_DEBUG handling
to before relocations and the mprotect are done.
ok kettenis@
|
|
for our development process.
ok kettenis@ deraadt@
|
|
portion like crt0 does. This is prep for eliminating _dl_fixup_user_env()
Mark almost everything in resolve.h as hidden, to improve code generation.
ok kettenis@ mpi@ "good time" deraadt@
|
|
load time only nwo. Rename _dl_searchnum and lastlookup to _dl_grpsym_gen
and grpsym_gen as they are generation numbers. Merge _dl_newsymsearch()
into _dl_cache_grpsym_list_setup().
ok millert@
|
|
needs to lock down the entire load group, not just the specific object.
problem report and ok sthen@
been in snaps for a week
|
|
a new MI routine _dl_protect_segment(), and use that for protecting the
GOT and--on some archs--the PLT.
Amazing testing turnaround by miod@, who apparently violated relativity
to get back results on some archs as fast as he did
|
|
|
|
|
|
fix _dl_strdup to return NULL instead of crash; ok deraadt@
|
|
ok okan kettenis
|
|
ok guenther
|
|
each plt call, allowing to trace a binary linked against shared library at the
public function call level.
To do so, ltrace(1) sets up some environment variables to enable plt tracing
in ld.so, and invokes ktrace(2) for utrace events. ld.so will force lazy
binding and will send an utrace record in the plt resolver, without updating
the plt.
Minimal filtering capabilities are provided, inspired by Solaris' truss -u,
to limit tracing to libraries and/or symbol names. Non-traced libraries and
symbols will have the regular resolver processing, with the expected plt
update.
"Get it in" deraadt
|
|
Much assistance and testing by miod
ok miod@
|
|
Improvements and okay matthew@, millert@, guenther@
|
|
pointers to prepare for adding rpath ORIGIN support.
okay matthew@ millert@
|
|
ok kurt
|
|
ok matthew@
|
|
DF_1_NODELETE and DF_1_INITFIRST, as well as DF_1_NOW and DF_1_GLOBAL.
Committing for kurt@ who worked out the final version; ok guenther@ drahn@
|
|
has some issues. Discussed with various, ok drahn@
|
|
|
|
get it in tree now deraadt@, ok by several ports folks. Thanks for the testing.
|
|
|
|
|
|
Pointed out by patrick keshish.
|
|
already generated list. Speeds up startup on deeply nested dlopen binaries.
ok guenther@, tested by ckuethe@ and ajacoutot@
|
|
for all objects which simplifies phdr usage in a few places.
"go for it" drahn@
|
|
- rename private values in struct elf_object to better
describe their meaning:
s/load_offs/obj_base/ "object's address '0' base"
s/load_addr/load_base/ "The base address of the loadable
segments"
- gdb needs the obj_base value so swap positions with load_base in
struct elf_object
- fix a few occurrences of where load_base was used instead of
obj_base.
With help and okay drahn@
|
|
Prelink fixes the address of libraries making 'return to libc' attacks trival,
prebind uses a different method to achieve most of the same gains, however
without adding any security conerns.
Still under development, now in-tree.
|
|
ok drahn@
|
|
simpler, however it broke ldd refcount output. use _dl_link_child to
increment refcounts and adjust _dl_notify_unload_shlib to match.
work by drahn@ and myself. ok drahn@
|
|
[DT_LOPROC, DT_HIPROC].
ok kurt@
|
|
grpsym_list order to match Sun's docs. Also corrects bugs where
grpsym_list was either not created or partially created.
|
|
change.
|
|
|
|
|
|
group refs to own per object ref counter (grprefcount) and list
(grpref_list). corrects more complex load group ref cases and side effects
from initial implementation. design ideas and ok drahn@
|
|
refcount increments to _dl_link_sub. adjust _dl_notify_unload_shlib to
match new refcount method. ok drahn@
|