LoongArch: Enable gas sort relocs

Message ID 20230811081040.20681-1-hejinyang@loongson.cn
State Unresolved
Headers
Series LoongArch: Enable gas sort relocs |

Checks

Context Check Description
snail/binutils-gdb-check warning Git am fail log

Commit Message

Jinyang He Aug. 11, 2023, 8:10 a.m. UTC
  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>
---
 gas/config/tc-loongarch.h | 1 +
 1 file changed, 1 insertion(+)
  

Patch

diff --git a/gas/config/tc-loongarch.h b/gas/config/tc-loongarch.h
index a9f2a0a17..c75d8887f 100644
--- a/gas/config/tc-loongarch.h
+++ b/gas/config/tc-loongarch.h
@@ -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