* [PATCH] LoongArch: gas: Start a new frag after instructions that can be relaxed
@ 2024-01-21 3:23 mengqinggang
0 siblings, 0 replies; only message in thread
From: mengqinggang @ 2024-01-21 3:23 UTC (permalink / raw)
To: binutils
Cc: xuchenghua, chenglulu, liuzhensong, cailulu, xry111, i.swmail,
maskray, luweining, wanglei, hejinyang, mengqinggang
For R_LARCH_TLS_{LE_HI20_R,LE_ADD_R,IE_PC_HI20,LD_PC_HI20,GD_PC_HI20,
TLS_DESC_PC_HI20} relocations, start a new frag to get correct eh_frame info.
---
gas/config/tc-loongarch.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/gas/config/tc-loongarch.c b/gas/config/tc-loongarch.c
index 863ac9cea43..47ec8441a3b 100644
--- a/gas/config/tc-loongarch.c
+++ b/gas/config/tc-loongarch.c
@@ -1089,7 +1089,13 @@ append_fixp_and_insn (struct loongarch_cl_insn *ip)
if (symbol_get_frag (to) == symbol_get_frag (from))) */
if (LARCH_opts.relax
&& (BFD_RELOC_LARCH_PCALA_HI20 == reloc_info[0].type
- || BFD_RELOC_LARCH_GOT_PC_HI20 == reloc_info[0].type))
+ || BFD_RELOC_LARCH_GOT_PC_HI20 == reloc_info[0].type
+ || BFD_RELOC_LARCH_TLS_LE_HI20_R == reloc_info[0].type
+ || BFD_RELOC_LARCH_TLS_LE_ADD_R == reloc_info[0].type
+ || BFD_RELOC_LARCH_TLS_IE_PC_HI20 == reloc_info[0].type
+ || BFD_RELOC_LARCH_TLS_LD_PC_HI20 == reloc_info[0].type
+ || BFD_RELOC_LARCH_TLS_GD_PC_HI20 == reloc_info[0].type
+ || BFD_RELOC_LARCH_TLS_DESC_PC_HI20 == reloc_info[0].type))
{
frag_wane (frag_now);
frag_new (0);
--
2.36.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-01-21 3:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-21 3:23 [PATCH] LoongArch: gas: Start a new frag after instructions that can be relaxed mengqinggang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).