diff options
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/i386/dl-machine.h | 10 | ||||
-rw-r--r-- | sysdeps/m68k/dl-machine.h | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/sysdeps/i386/dl-machine.h b/sysdeps/i386/dl-machine.h index b52e604d4a..bcd388fd20 100644 --- a/sysdeps/i386/dl-machine.h +++ b/sysdeps/i386/dl-machine.h @@ -100,7 +100,7 @@ elf_machine_rel (struct link_map *map, *reloc_addr = sym ? (loadbase + sym->st_value) : 0; break; case R_386_32: - if (map->l_type == lt_interpreter) + if (resolve && map == &_dl_rtld_map) { /* Undo the relocation done here during bootstrapping. Now we will relocate it anew, possibly using a binding found in the user @@ -117,7 +117,7 @@ elf_machine_rel (struct link_map *map, *reloc_addr += sym ? (loadbase + sym->st_value) : 0; break; case R_386_RELATIVE: - if (map->l_type != lt_interpreter) /* Already done in dynamic linker. */ + if (!resolve || map != &_dl_rtld_map) /* Already done in rtld itself. */ *reloc_addr += map->l_addr; break; case R_386_PC32: @@ -229,9 +229,9 @@ _dl_start_user:\n\ leal (%esp,%eax,4), %esp\n\ # Push back the modified argument count.\n\ pushl %ecx\n\ - # Push _dl_loaded as argument in _dl_init_next call below.\n\ - movl _dl_loaded@GOT(%ebx), %eax\n\ - movl (%eax), %esi\n\ + # Push _dl_default_scope[2] as argument in _dl_init_next call below.\n\ + movl _dl_default_scope@GOT(%ebx), %eax\n\ + movl 8(%eax), %esi\n\ 0: pushl %esi\n\ # Call _dl_init_next to return the address of an initializer\n\ # function to run.\n\ diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index 74e88749e6..415216b14a 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -252,9 +252,9 @@ _dl_start_user: lea (%sp, %d0*4), %sp | Push back the modified argument count. move.l %d1, -(%sp) -0: | Push _dl_loaded as argument in _dl_init_next call below. - move.l ([_dl_loaded@GOT, %a5]), %d2 -0: move.l %d2, -(%sp) +0: | Push _dl_default_scope[2] as argument in _dl_init_next call below. + move.l ([_dl_default_scope@GOT, %a5]), %d2 +0: move.l (%d2, 8), -(%sp) | Call _dl_init_next to return the address of an initializer | function to run. bsr.l _dl_init_next@PLTPC |