We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cd419ae commit 23605f5Copy full SHA for 23605f5
riscv-rt/asm.S
@@ -12,6 +12,25 @@
12
.global _start
13
14
_start:
15
+ /* Jump to the absolute address defined by the linker script. */
16
+ // for 32bit
17
+ .if __riscv_xlen == 32
18
+ lui ra, %hi(_abs_start)
19
+ jr %lo(_abs_start)(ra)
20
+ .endif
21
+
22
+ // for 64bit
23
+ .if __riscv_xlen == 64
24
+1:
25
+ auipc ra, %pcrel_hi(1f)
26
+ ld ra, %pcrel_lo(1b)(ra)
27
+ jr ra
28
+ .align 3
29
30
+ .dword _abs_start
31
32
33
+_abs_start:
34
.cfi_startproc
35
.cfi_undefined ra
36
0 commit comments