--- src/libexec/rtld-elf/rtld.c 2005/02/04 01:33:48 1.12 +++ src/libexec/rtld-elf/rtld.c 2005/02/05 22:54:49 1.13 @@ -677,6 +677,7 @@ digest_dynamic(Obj_Entry *obj) break; case DT_RPATH: + case DT_RUNPATH: /* XXX: process separately */ /* * We have to wait until later to process this, because we * might not have gotten the address of the string table yet. @@ -702,6 +703,22 @@ digest_dynamic(Obj_Entry *obj) ((Elf_Dyn*)dynp)->d_un.d_ptr = (Elf_Addr) &r_debug; break; + case DT_FLAGS: + if (dynp->d_un.d_val & DF_ORIGIN) { + obj->origin_path = xmalloc(PATH_MAX); + if (rtld_dirname(obj->path, obj->origin_path) == -1) + die(); + } + if (dynp->d_un.d_val & DF_SYMBOLIC) + obj->symbolic = true; + if (dynp->d_un.d_val & DF_TEXTREL) + obj->textrel = true; + if (dynp->d_un.d_val & DF_BIND_NOW) + obj->bind_now = true; + if (dynp->d_un.d_val & DF_STATIC_TLS) + ; + break; + default: dbg("Ignoring d_tag %d = %#x", dynp->d_tag, dynp->d_tag); break; @@ -1474,7 +1491,7 @@ relocate_objects(Obj_Entry *first, bool if (reloc_plt(obj) == -1) return -1; /* Relocate the jump slots if we are doing immediate binding. */ - if (bind_now) + if (obj->bind_now || bind_now) if (reloc_jmpslots(obj) == -1) return -1;