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 v3 2/5] LoongArch: include: Add support for tls le relax.
Date: Fri, 15 Dec 2023 18:06:30 +0800	[thread overview]
Message-ID: <20231215100633.65397-3-changjiachen@stu.xupt.edu.cn> (raw)
In-Reply-To: <20231215100633.65397-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 | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/include/elf/loongarch.h b/include/elf/loongarch.h
index e31395e13d5..bccd36d452e 100644
--- a/include/elf/loongarch.h
+++ b/include/elf/loongarch.h
@@ -250,6 +250,18 @@ 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 rd,%le_hi20_r (sym).  */
+RELOC_NUMBER (R_LARCH_TLS_LE_HI20_R, 110)
+
+/* TLS-LE-ADD
+   add.d   rd,rj,rk,%le_add_r (sym).  */
+RELOC_NUMBER (R_LARCH_TLS_LE_ADD_R, 111)
+
+/* TLS-LE-ST
+   st.w/addi.w/ld.w rd,rj,%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-15 10:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-15 10:06 [PATCH v3 0/5] LoongArch tls le model linker relaxation support changjiachen
2023-12-15 10:06 ` [PATCH v3 1/5] LoongArch: bfd: Add support for tls le relax changjiachen
2023-12-15 10:06 ` changjiachen [this message]
2023-12-15 10:06 ` [PATCH v3 3/5] LoongArch: opcodes: " changjiachen
2023-12-15 10:06 ` [PATCH v3 4/5] LoongArch: gas: " changjiachen
2023-12-15 10:06 ` [PATCH v3 5/5] LoongArch: ld: " changjiachen
2023-12-15 12:34 ` [PATCH v3 0/5] LoongArch tls le model linker relaxation support Xi Ruoyao
2023-12-19  5:33   ` 常佳琛
2023-12-19 10:21     ` 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=20231215100633.65397-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).