static inline void
elf_machine_rela (struct link_map *map,
- const Elf32_Rel *reloc, const Elf32_Sym *sym,
+ const Elf32_Rela *reloc, const Elf32_Sym *sym,
Elf32_Addr (*resolve) (const Elf32_Sym **ref,
Elf32_Addr reloc_addr,
int noplt))
+ reloc->r_addend);
break;
case R_68K_32:
- loadbase = (*resolve) (&sym, (Elf32_Addr) reloc_addr, 0);
+ loadbase = (resolve ? (*resolve) (&sym, (Elf32_Addr) reloc_addr, 0) :
+ /* RESOLVE is null during bootstrap relocation. */
+ map->l_addr);
*reloc_addr = ((sym ? (loadbase + sym->st_value) : 0)
+ reloc->r_addend);
break;
.globl _start
.globl _dl_start_user
_start:
+ move.l %sp, -(%sp)
jbsr _dl_start
+ addq.l #4, %sp
_dl_start_user:
| Save the user entry point address in %a4.
move.l %d0, %a4
lea (%sp, %d0*4), %sp
| Push back the modified argument count.
move.l %d1, -(%sp)
- | Push _dl_loaded as argument in _dl_init_next call below.
- move.l ([_dl_loaded@GOT, %a5]), %d2
+0: | Push _dl_default_scope[2] as argument in _dl_init_next call below.
+ move.l ([_dl_default_scope@GOT, %a5], 8), %d2
0: move.l %d2, -(%sp)
| Call _dl_init_next to return the address of an initializer
| function to run.