fix resolving interp string address on fdpic ldd command
authorRich Felker <dalias@aerifal.cx>
Tue, 22 Sep 2015 19:21:57 +0000 (19:21 +0000)
committerRich Felker <dalias@aerifal.cx>
Tue, 22 Sep 2015 19:21:57 +0000 (19:21 +0000)
src/ldso/dynlink.c

index 2c822b648e9560699f794ae53db90c687d092246..f8325a010093c17a6c77a8b4386fdc59652895e1 100644 (file)
@@ -1512,8 +1512,7 @@ _Noreturn void __dls3(size_t *sp)
                if (ldd_mode) {
                        for (i=0; i<app.phnum; i++) {
                                if (app.phdr[i].p_type == PT_INTERP)
-                                       ldso.name = (void *)(app.base
-                                               + app.phdr[i].p_vaddr);
+                                       ldso.name = laddr(&app, app.phdr[i].p_vaddr);
                        }
                        dprintf(1, "\t%s (%p)\n", ldso.name, ldso.base);
                }