From: Xi Ruoyao <xry111@xry111.site>
To: changjiachen <changjiachen@stu.xupt.edu.cn>, binutils@sourceware.org
Cc: xuchenghua@loongson.cn, chenglulu@loongson.cn,
liuzhensong@loongson.cn, 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
Subject: Re: [PATCH v2 1/5] LoongArch: bfd: Add support for tls le relax.
Date: Sat, 02 Dec 2023 15:20:46 +0800 [thread overview]
Message-ID: <0f7240b3d15357dcb3d6852bb6e47e7ca02538dc.camel@xry111.site> (raw)
In-Reply-To: <20231202065334.25904-2-changjiachen@stu.xupt.edu.cn>
On Sat, 2023-12-02 at 14:53 +0800, changjiachen wrote:
> + switch (ELFNN_R_TYPE (rel_hi->r_info))
> + {
> + case R_LARCH_TLS_LE_HI20_R:
> + case R_LARCH_TLS_LE_ADD_R:
Format issue: "case" should be aligned with "{".
> + /* delete insn. */
> + rel_hi->r_info = ELFNN_R_INFO (ELFNN_R_SYM (rel_hi->r_info),
> + R_LARCH_DELETE);
IIRC R_LARCH_DELETE has caused some issues before, so Qinggang has
removed the uses of it. Are you sure using it is OK here or should we
just avoid it as well?
> + break;
> + case R_LARCH_TLS_LE_LO12_R:
> + /* Change rj to $tp. */
> + insn_rj = 0x2 << 5;
> + /* Get rd register. */
> + insn_rd = insn & 0x1f;
> + /* Write symbol offset. */
> + symval <<= 10;
> + /* Writes the modified instruction. */
> + insn = insn & 0xffc00000;
> + insn = insn | symval | insn_rj | insn_rd;
> + bfd_put (32, abfd, insn, contents + rel_hi->r_offset);
> + break;
> + default:
> + break;
> + }
--
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University
next prev parent reply other threads:[~2023-12-02 7:20 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 [this message]
2023-12-02 9:36 ` 常佳琛
2023-12-02 6:53 ` [PATCH v2 2/5] LoongArch: include: " changjiachen
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=0f7240b3d15357dcb3d6852bb6e47e7ca02538dc.camel@xry111.site \
--to=xry111@xry111.site \
--cc=Lazy_Linux@126.com \
--cc=binutils@sourceware.org \
--cc=cailulu@loongson.cn \
--cc=changjiachen@stu.xupt.edu.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=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).