From 22c62092858e5623338a18a42491718d754977e8 Mon Sep 17 00:00:00 2001 From: Lulu Cai Date: Sat, 21 Sep 2024 11:29:39 +0800 Subject: LoongArch: Fixed R_LARCH_[32/64]_PCREL generation bug The enum BFD_RELOC_[32/64] was mistakenly used in the macro instead of the relocation in fixp. This can cause the second relocation of a pair to be deleted when -mthin-add-sub is enabled. Apply the correct macro to fix this. Also sets the initial value of -mthin-add-sub. --- opcodes/loongarch-opc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'opcodes') diff --git a/opcodes/loongarch-opc.c b/opcodes/loongarch-opc.c index 6bd436f..0ba745f 100644 --- a/opcodes/loongarch-opc.c +++ b/opcodes/loongarch-opc.c @@ -24,7 +24,8 @@ struct loongarch_ASEs_option LARCH_opts = { - .relax = 1 + .relax = 1, + .thin_add_sub = 0 }; size_t -- cgit v1.1