-/* $OpenBSD: md_init.h,v 1.1 2021/04/28 00:11:11 drahn Exp $ */
+/* $OpenBSD: md_init.h,v 1.2 2021/05/16 16:00:50 drahn Exp $ */
/*
* Copyright (c) 2020 Dale Rahn <drahn@openbsd.org>
*
" .type __start, @function \n" \
"_start: \n" \
"__start: \n" \
- " mv a3, a2 # cleanup \n" \
"/* Get argc/argv/envp from stack */ \n" \
" ld a0, (sp) \n" \
" addi a1, sp, 0x8 \n" \
-/* $OpenBSD: ldasm.S,v 1.1 2021/04/28 15:16:26 drahn Exp $ */
+/* $OpenBSD: ldasm.S,v 1.2 2021/05/16 16:00:50 drahn Exp $ */
/*
* Copyright (c) 2016,2021 Dale Rahn <drahn@openbsd.org>
mv sp, fp // move stack back
mv fp, zero // clear frame back pointer
-2: auipc a3, %got_pcrel_hi(_dl_dtors) /* cleanup */
+2: auipc a3, %pcrel_hi(_dl_dtors) /* cleanup */
addi a3, a3, %pcrel_lo(2b)
jr a0