]> 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:44:24 +0000 (11:44 +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 c75a8192cb0c91343e467777e33196dd61714d0d..3c3e1b31d3d33fa9dc65e0373be8c92266b3d54a 100644 (file)
@@ -73,6 +73,8 @@ extern void tc_loongarch_parse_to_dw2regnum (expressionS *);
    Here is the type 0, will fill andi insn later.  */
 #define NOP_OPCODE (0x00)
 
+#define GAS_SORT_RELOCS 1
+
 #define SUB_SEGMENT_ALIGN(SEG, FRCHAIN) 0
 
 #define HANDLE_ALIGN(fragp) loongarch_handle_align (fragp)