glue: implement for riscv64

Change-Id: I0d701050e8ee008db68b54d458de07c653a370d7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3920
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
This commit is contained in:
X512 2021-05-17 16:42:37 +09:00 committed by Adrien Destugues
parent 0ba2e27fc4
commit 4a6c01c33f
2 changed files with 11 additions and 4 deletions

View File

@ -21,8 +21,12 @@
.section .init
FUNCTION(_init):
addi sp, sp, -16
sd ra, 8(sp)
// crtbegin.o stuff comes here
.section .fini
FUNCTION(_fini):
// crtbegin.o stuff comes here
addi sp, sp, -16
sd ra, 8(sp)
// crtend.o stuff comes here

View File

@ -9,9 +9,12 @@
*/
.section .init
// the image ID and program args are still on the stack
ld ra, 8(sp)
addi sp, sp, 16
ret
.section .fini
// the image ID and program args are still on the stack
ld ra, 8(sp)
addi sp, sp, 16
ret