Explorar o código

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.
Rich Felker %!s(int64=14) %!d(string=hai) anos
pai
achega
c7debe13ee
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      src/ldso/dynlink.c

+ 1 - 0
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) {