rtld: Perform reloc before filtree dependency object init
authorJohn Marino <draco@marino.st>
Mon, 20 Aug 2012 19:27:06 +0000 (21:27 +0200)
committerJohn Marino <draco@marino.st>
Mon, 20 Aug 2012 20:24:25 +0000 (22:24 +0200)
commit26dd35c9bbbbeffac40d091e7df63b02e7e2f078
treeef97fcdc8eacc95cbbcfcfee56819eda004c4f8c
parentba49bbaa8816ba7500f0c5ce1d3dd2d7710659e8
rtld: Perform reloc before filtree dependency object init

Ensure that for the object which is a dependency of some filtree,
relocations are performed before the object's initializer is called.
While dlopen()ing an object, relocate the whole DAG rooted in the
object instead of only relocating the object itself and list of newly
loaded dependencies.

Reversed sequence currently can occur if the same object is a
dependency for both filtree and filter since filtrees are loaded typically
during the relocation processing when some filter dependencies might be
already loaded but not yet relocated.

Taken-from: FreeBSD SVN 237659 (27 June 2012)
libexec/rtld-elf/rtld.c