make dynamic linker relocate the main program image last, after all libs
[musl] / src / ldso / dynlink.c
index 9a0697c..82aaeec 100644 (file)
@@ -462,6 +462,7 @@ void *__dynlink(int argc, char **argv, size_t *got)
        load_deps(head);
 
        make_global(head);
+       reloc_all(head->next);
        reloc_all(head);
 
        if (rtld_used) {