From c7debe13ee3c1ca2039b67bb7e4891365017ac1a Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Tue, 28 Jun 2011 14:13:51 -0400 Subject: [PATCH] make dynamic linker relocate the main program image last, after all libs prior to this change, copy relocations for initialized pointer variables would not reflect the relocated contents of the pointer. --- src/ldso/dynlink.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ldso/dynlink.c b/src/ldso/dynlink.c index 9a0697c8..82aaeec1 100644 --- a/src/ldso/dynlink.c +++ b/src/ldso/dynlink.c @@ -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) { -- 2.25.1