la was fine when using binutils ld >= 2.43. But older (2.41 and 2.42)
binutils ld produced:
none/tests/riscv64/integer.c:81:(.text+0x22cd8): dangerous relocation:
The addend isn't allowed for R_RISCV_GOT_HI20
Using lla makes integer and compressed link with all binutils ld
versions.
".endif;" \
".if \"" #rs1 "\" != \"unused\";" \
"sd " #rs1 ", 48(%[w]);" /* Spill rs1. */ \
- "la " #rs1 ", " rs1_val ";" /* Load the first input. */ \
+ "lla " #rs1 ", " rs1_val ";" /* Load the first input. */ \
".endif;" \
".if \"" #rs2 "\" != \"unused\";" \
"sd " #rs2 ", 56(%[w]);" /* Spill rs2. */ \