Make room for the argument save area in _rtld_start(). The PLT stub already

made room from _rtld_bind_start(), but add a comment explaining the instruction
it uses.
This commit is contained in:
mycroft 2002-09-26 02:14:10 +00:00
parent f1c792d648
commit 26043b23b0
2 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: mdreloc.c,v 1.28 2002/09/25 22:29:12 mycroft Exp $ */
/* $NetBSD: mdreloc.c,v 1.29 2002/09/26 02:14:10 mycroft Exp $ */
/*-
* Copyright (c) 2000 Eduardo Horvath.
@ -213,7 +213,7 @@ caddr_t _rtld_bind __P((const Obj_Entry *, Elf_Word));
/*
* Install rtld function call into this PLT slot.
*/
#define SAVE 0x9de3bf50
#define SAVE 0x9de3bf50 /* i.e. `save %sp,-176,%sp' */
#define SETHI_l0 0x21000000
#define SETHI_l1 0x23000000
#define OR_l0_l0 0xa0142000

View File

@ -1,4 +1,4 @@
/* $NetBSD: rtld_start.S,v 1.12 2002/09/25 22:25:12 mycroft Exp $ */
/* $NetBSD: rtld_start.S,v 1.13 2002/09/26 02:14:10 mycroft Exp $ */
/*-
* Copyright (c) 2000 Eduardo Horvath.
@ -58,7 +58,7 @@
.register %g3,#scratch
/* Offset of ARGC from bottom of stack */
#define ARGC (16*8)
#define ARGC 176
.section ".text"
.align 4
@ -73,7 +73,7 @@
_rtld_start:
mov 0, %fp /* Erect a fence post for ourselves */
mov %g1, %l1 /* save ps_strings */
sub %sp, 16, %sp /* Make room for return args */
sub %sp, 48+16, %sp /* Make room for return args */
sethi %hi(_GLOBAL_OFFSET_TABLE_-4), %l7
call .LLGETPC0
@ -91,7 +91,7 @@ _rtld_start:
ldx [%sp + BIAS + ARGC], %g3 /* arg: cleanup */
ldx [%sp + BIAS + ARGC + 8], %g2 /* arg: obj */
add %sp, 16, %sp /* restore stack pointer */
add %sp, 48+16, %sp /* restore stack pointer */
jmp %o0
mov %l1, %g1 /* restore ps_strings */