Skip to content

Instantly share code, notes, and snippets.

@doug65536
Created June 6, 2021 21:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save doug65536/4b4d0dc3874cbededfa4d74ce2da5529 to your computer and use it in GitHub Desktop.
Save doug65536/4b4d0dc3874cbededfa4d74ce2da5529 to your computer and use it in GitHub Desktop.
.section .text.entry, "x", @progbits
entry:
la a1,___image_end
la a2,___image_vma
la a3,___image_lma
.Lcopy_more_data:
ld a4,(a3)
sd a4,(a2)
add a3,a3,8
add a2,a2,8
bgtu a1,a2,.Lcopy_more_data
la a1,___bss_en
la a2,___bss_st
.Lzero_more_bss:
sd a0,(a2)
add a2,a2,8
bgtu a1,a2,.Lzero_more_bss
call main
idle_trap:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment