public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: changjiachen <changjiachen@stu.xupt.edu.cn>
To: binutils@sourceware.org
Cc: xuchenghua@loongson.cn, chenglulu@loongson.cn,
	liuzhensong@loongson.cn, xry111@xry111.site, i.swmail@xen0n.name,
	maskray@google.com, cailulu@loongson.cn, luweining@loongson.cn,
	wanglei@loongson.cn, hejinyang@loongson.cn, Lazy_Linux@126.com,
	mengqinggang@loongson.cn,
	changjiachen <changjiachen@stu.xupt.edu.cn>
Subject: [PATCH v2 2/5] LoongArch: include: Add support for tls le relax.
Date: Sat,  2 Dec 2023 14:53:31 +0800	[thread overview]
Message-ID: <20231202065334.25904-3-changjiachen@stu.xupt.edu.cn> (raw)
In-Reply-To: <20231202065334.25904-1-changjiachen@stu.xupt.edu.cn>

Add new relocs number for tls le relax.

include/ChangeLog:

	* elf/loongarch.h:
	(RELOC_NUMBER (R_LARCH_TLS_LE_HI20_R, 110)): New relocs number.
	(RELOC_NUMBER (R_LARCH_TLS_LE_ADD_R, 111)): Likewise.
	(RELOC_NUMBER (R_LARCH_TLS_LE_LO12_R, 112)): Likewise.
---
 include/elf/loongarch.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/include/elf/loongarch.h b/include/elf/loongarch.h
index e31395e13d5..e04ee99bcf2 100644
--- a/include/elf/loongarch.h
+++ b/include/elf/loongarch.h
@@ -250,6 +250,19 @@ RELOC_NUMBER (R_LARCH_ADD_ULEB128, 107)
 RELOC_NUMBER (R_LARCH_SUB_ULEB128, 108)
 
 RELOC_NUMBER (R_LARCH_64_PCREL, 109)
+/* TLS-LE-LUI
+   lu12i.w $r12,%le_hi20_r (sym).  */
+RELOC_NUMBER (R_LARCH_TLS_LE_HI20_R, 110)
+
+/* TLS-LE-ADD
+   add.d   $r12,$r12,$r2,
+	   %tls_le_add_r (sym).  */
+RELOC_NUMBER (R_LARCH_TLS_LE_ADD_R, 111)
+
+/* TLS-LE-ST
+   st.w $r12,%le_lo12_r (sym).  */
+RELOC_NUMBER (R_LARCH_TLS_LE_LO12_R, 112)
+
 
 END_RELOC_NUMBERS (R_LARCH_count)
 
-- 
2.40.0


  parent reply	other threads:[~2023-12-02  6:53 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-02  6:53 [PATCH v2 0/5] LoongArch tls le model linker relaxation support changjiachen
2023-12-02  6:53 ` [PATCH v2 1/5] LoongArch: bfd: Add support for tls le relax changjiachen
2023-12-02  7:20   ` Xi Ruoyao
2023-12-02  9:36     ` 常佳琛
2023-12-02  6:53 ` changjiachen [this message]
2023-12-02  6:53 ` [PATCH v2 3/5] LoongArch: opcodes: " changjiachen
2023-12-02  7:14   ` Xi Ruoyao
2023-12-02  9:40     ` 常佳琛
2023-12-05  1:36     ` mengqinggang
2023-12-05  3:59       ` Xi Ruoyao
2023-12-05  9:13         ` mengqinggang
2023-12-02  6:53 ` [PATCH v2 4/5] LoongArch: gas: " changjiachen
2023-12-02  6:53 ` [PATCH v2 5/5] LoongArch: ld: " changjiachen
2023-12-02  7:17   ` Xi Ruoyao
2023-12-02  9:30     ` 常佳琛
2023-12-04  2:25 ` [PATCH v2 0/5] LoongArch tls le model linker relaxation support Jinyang He
2023-12-04  3:39   ` 常佳琛
2023-12-04  8:57     ` Jinyang He
2023-12-04  9:25       ` 常佳琛
2023-12-04  9:37         ` Xi Ruoyao
2023-12-04  9:42           ` Xi Ruoyao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231202065334.25904-3-changjiachen@stu.xupt.edu.cn \
    --to=changjiachen@stu.xupt.edu.cn \
    --cc=Lazy_Linux@126.com \
    --cc=binutils@sourceware.org \
    --cc=cailulu@loongson.cn \
    --cc=chenglulu@loongson.cn \
    --cc=hejinyang@loongson.cn \
    --cc=i.swmail@xen0n.name \
    --cc=liuzhensong@loongson.cn \
    --cc=luweining@loongson.cn \
    --cc=maskray@google.com \
    --cc=mengqinggang@loongson.cn \
    --cc=wanglei@loongson.cn \
    --cc=xry111@xry111.site \
    --cc=xuchenghua@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).