22 Load Global Address
The following example shows the lga pseudoinstruction which is used to load
global symbol addresses:
lga a0, msg + 1
This generates the following instructions and relocations as seen by objdump
(for RV64; RV32 will use lw instead of ld):
0000000000000000 \<.text>:
0: 00000517 auipc a0,0x0
0: R_RISCV_GOT_HI20 msg+0x1
4: 00053503 ld a0,0(a0) # 0 \<.text>
4: R_RISCV_PCREL_LO12_I .L0