From 1058c0921e72901d8271db03667103ca2b49cfeb Mon Sep 17 00:00:00 2001 From: guenther Date: Mon, 18 Jul 2016 04:35:57 +0000 Subject: [PATCH] Updated advice^Wcode from miod@ for passing &_DYNAMIC to _dl_boot_bind ok aoyama@ --- libexec/ld.so/m88k/ldasm.S | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libexec/ld.so/m88k/ldasm.S b/libexec/ld.so/m88k/ldasm.S index f4719a8507c..be80860deda 100644 --- a/libexec/ld.so/m88k/ldasm.S +++ b/libexec/ld.so/m88k/ldasm.S @@ -1,4 +1,4 @@ -/* $OpenBSD: ldasm.S,v 1.20 2016/07/15 09:25:47 guenther Exp $ */ +/* $OpenBSD: ldasm.S,v 1.21 2016/07/18 04:35:57 guenther Exp $ */ /* * Copyright (c) 2013 Miodrag Vallat. @@ -75,9 +75,10 @@ ENTRY(_dl_start) or %r2, %r30, 0 | kernel args or %r3, %r31, 0 | array base bsr 1f | the following instruction is skipped - bcnd eq0, %r0, _DYNAMIC | but gives us the pc-relative offset -1: ld.hu %r5, %r1, 2 | fetch branch offset (low 16 bits) - lda %r4, %r1[%r5] | + bsr _DYNAMIC | but gives us the pc-relative offset +1: ld %r6, %r1, 0 | fetch branch instruction + mak %r5, %r6, 26<2> | pick branch offset and shift left by 2 + addu %r4, %r5, %r1 bsr _dl_boot_bind ld %r2, %r30, 0 | argc -- 2.20.1