diff options
author | 2017-01-23 13:39:24 +0000 | |
---|---|---|
committer | 2017-01-23 13:39:24 +0000 | |
commit | 54a854600706a1fb5c183476cc4b202cc2633afb (patch) | |
tree | 95e26274cde90eae14e0bf66c5f1d91ad02b9071 | |
parent | Split most of SSL_METHOD out into an internal variant, which is opaque. (diff) | |
download | wireguard-openbsd-54a854600706a1fb5c183476cc4b202cc2633afb.tar.xz wireguard-openbsd-54a854600706a1fb5c183476cc4b202cc2633afb.zip |
In comparison to _start, where we only need the address of the
function, we need another indirection for esym. The address of
esym is simply the address of the variable. But in the case of
esym we want to read and modify its value.
ok kettenis@
-rw-r--r-- | sys/arch/arm64/arm64/locore.S | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/sys/arch/arm64/arm64/locore.S b/sys/arch/arm64/arm64/locore.S index a2623f598c9..da4a1d677fc 100644 --- a/sys/arch/arm64/arm64/locore.S +++ b/sys/arch/arm64/arm64/locore.S @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.S,v 1.4 2017/01/15 18:16:55 patrick Exp $ */ +/* $OpenBSD: locore.S,v 1.5 2017/01/23 13:39:24 patrick Exp $ */ /*- * Copyright (c) 2012-2014 Andrew Turner * All rights reserved. @@ -58,10 +58,6 @@ _start: mov x22, x1 mov x23, x2 - /* Store symbol value. */ - adr x0, .Lesym - str x21, [x0] - /* Drop to EL1 */ bl drop_to_el1 @@ -82,6 +78,12 @@ _start: /* Get the virt -> phys offset */ bl get_virt_delta + /* Store symbol value. */ + adr x0, .Lesym + ldr x0, [x0] + sub x0, x0, x29 + str x21, [x0] + /* * At this point: * x29 = PA - VA @@ -355,6 +357,8 @@ create_pagetables: adr x7, .Lesym ldr x7, [x7] sub x7, x7, x29 + ldr x7, [x7] + sub x7, x7, x29 /* Find the end - begin */ sub x8, x7, x6 |