From 4091830aa547ac07c50fffa80de2436a82ac017f Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Thu, 24 Apr 2025 03:11:26 +0200 Subject: [PATCH] none/tests/riscv64/testinst.h: Use lla instead of la in JMP_RANGE 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. --- none/tests/riscv64/testinst.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/none/tests/riscv64/testinst.h b/none/tests/riscv64/testinst.h index 2f087d8b7..7f577edc3 100644 --- a/none/tests/riscv64/testinst.h +++ b/none/tests/riscv64/testinst.h @@ -403,7 +403,7 @@ static void show_block_diff(unsigned char* block1, ".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. */ \ -- 2.47.2