From: Mark Wielaard Date: Thu, 24 Apr 2025 01:11:26 +0000 (+0200) Subject: none/tests/riscv64/testinst.h: Use lla instead of la in JMP_RANGE X-Git-Tag: VALGRIND_3_25_0~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4091830aa547ac07c50fffa80de2436a82ac017f;p=thirdparty%2Fvalgrind.git 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. --- 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. */ \