diff options
| author | mhitch <mhitch@NetBSD.org> | 1998-04-09 04:45:08 +0000 |
|---|---|---|
| committer | mhitch <mhitch@NetBSD.org> | 1998-04-09 04:45:08 +0000 |
| commit | f00af7b07cdc52e9c92b9d0c0bb2508c45feff77 (patch) | |
| tree | 2432c7490ff585467874466950ca34a74141400e /libexec | |
| parent | 09339bcf7b31761f10163a58ddc8483edad43ef2 (diff) | |
Oops - when assembled with PIC, the jal gets expanded, so what used to be
in the branch delay slot was no longer getting executed at the proper time.
This resulted in a corrupt ps_strings pointer and caused programs trying to
use ps_strings to fail.
Diffstat (limited to 'libexec')
| -rw-r--r-- | libexec/ld.elf_so/arch/mips/rtld_start.S | 5 | ||||
| -rw-r--r-- | libexec/ld.elf_so/mips/rtld_start.S | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/libexec/ld.elf_so/arch/mips/rtld_start.S b/libexec/ld.elf_so/arch/mips/rtld_start.S index 403fcd59242..2005bdcafce 100644 --- a/libexec/ld.elf_so/arch/mips/rtld_start.S +++ b/libexec/ld.elf_so/arch/mips/rtld_start.S @@ -1,4 +1,4 @@ -/* $NetBSD: rtld_start.S,v 1.1 1998/03/25 04:12:32 mhitch Exp $ */ +/* $NetBSD: rtld_start.S,v 1.2 1998/04/09 04:45:08 mhitch Exp $ */ /* * Copyright 1997 Michael L. Hitch <mhitch@montana.edu> @@ -40,8 +40,9 @@ LEAF(rtld_start) # 8(sp) for obj_main move s0,a0 # save stack pointer from a0 addu a0, sp, 4 # _rtld argument - jal _C_LABEL(_rtld) # v0 = _rtld(sp) move s1,a3 # save ps_strings pointer + jal _C_LABEL(_rtld) # v0 = _rtld(sp) + nop # [BD if jal not expanded] lw a1, 4(sp) # our atexit function lw a2, 8(sp) # obj_main entry addu sp, sp,12 # readjust stack diff --git a/libexec/ld.elf_so/mips/rtld_start.S b/libexec/ld.elf_so/mips/rtld_start.S index 403fcd59242..2005bdcafce 100644 --- a/libexec/ld.elf_so/mips/rtld_start.S +++ b/libexec/ld.elf_so/mips/rtld_start.S @@ -1,4 +1,4 @@ -/* $NetBSD: rtld_start.S,v 1.1 1998/03/25 04:12:32 mhitch Exp $ */ +/* $NetBSD: rtld_start.S,v 1.2 1998/04/09 04:45:08 mhitch Exp $ */ /* * Copyright 1997 Michael L. Hitch <mhitch@montana.edu> @@ -40,8 +40,9 @@ LEAF(rtld_start) # 8(sp) for obj_main move s0,a0 # save stack pointer from a0 addu a0, sp, 4 # _rtld argument - jal _C_LABEL(_rtld) # v0 = _rtld(sp) move s1,a3 # save ps_strings pointer + jal _C_LABEL(_rtld) # v0 = _rtld(sp) + nop # [BD if jal not expanded] lw a1, 4(sp) # our atexit function lw a2, 8(sp) # obj_main entry addu sp, sp,12 # readjust stack |
