]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
LoongArch: Enable gas sort relocs
authorJinyang He <hejinyang@loongson.cn>
Fri, 11 Aug 2023 08:10:40 +0000 (16:10 +0800)
committerliuzhensong <liuzhensong@loongson.cn>
Mon, 11 Nov 2024 03:48:06 +0000 (11:48 +0800)
The md_pre_output_hook creating fixup is asynchronous, causing relocs
may be out of order in .eh_frame. Define GAS_SORT_RELOCS so that reorder
relocs when write_relocs.

Reported-by: Rui Ueyama <rui314@gmail.com>
(cherry picked from commit 7c93730fe50c22129e751d8479e64bc970b75aac)

gas/config/tc-loongarch.h

index a9f2a0a17cc987a52c9e15a555356828db9ce481..c75d8887f6aaf89a11a1fc632a3184107d77ed9c 100644 (file)
@@ -115,6 +115,7 @@ extern void tc_loongarch_parse_to_dw2regnum (expressionS *);
 
 extern void loongarch_pre_output_hook (void);
 #define md_pre_output_hook loongarch_pre_output_hook ()
+#define GAS_SORT_RELOCS 1
 
 #define SUB_SEGMENT_ALIGN(SEG, FRCHAIN) 0