public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Hannes Domani <ssbssa@yahoo.de>
To: "binutils@sourceware.org" <binutils@sourceware.org>,
	 changjiachen <changjiachen@stu.xupt.edu.cn>
Cc: "xuchenghua@loongson.cn" <xuchenghua@loongson.cn>,
	 "chenglulu@loongson.cn" <chenglulu@loongson.cn>,
	 "liuzhensong@loongson.cn" <liuzhensong@loongson.cn>,
	 "xry111@xry111.site" <xry111@xry111.site>,
	 "i.swmail@xen0n.name" <i.swmail@xen0n.name>,
	 "maskray@google.com" <maskray@google.com>,
	 "cailulu@loongson.cn" <cailulu@loongson.cn>,
	 "luweining@loongson.cn" <luweining@loongson.cn>,
	 "wanglei@loongson.cn" <wanglei@loongson.cn>,
	 "hejinyang@loongson.cn" <hejinyang@loongson.cn>,
	 "lazy_linux@126.com" <lazy_linux@126.com>,
	 "mengqinggang@loongson.cn" <mengqinggang@loongson.cn>
Subject: Re: [PATCH v5 1/5] LoongArch: bfd: Add support for tls le relax.
Date: Fri, 29 Dec 2023 09:53:08 +0000 (UTC)	[thread overview]
Message-ID: <1635652366.9475871.1703843588198@mail.yahoo.com> (raw)
In-Reply-To: <20231228033957.108449-2-changjiachen@stu.xupt.edu.cn>

 Am Donnerstag, 28. Dezember 2023, 04:41:38 MEZ hat changjiachen <changjiachen@stu.xupt.edu.cn> Folgendes geschrieben:

> Add tls le relax support and related relocs in bfd.
>
> New relocation related explanation can refer to the following url:
> https://github.com/loongson/la-abi-specs/blob/release/laelf.adoc
>
> This support does two main things:
>
> 1. Implement support for three new relocation items in bfd.
>
> The three new relocation items are shown below:
>
> R_LARCH_TLS_LE_ADD_R
> R_LARCH_TLS_LE_HI20_R
> R_LARCH_TLS_LE_LO12_R
>
> 2. ADD a new macro RELOCATE_TLS_TP32_HI20
>
> Handle problems caused by symbol extensions in TLS LE, The processing
> is similar to the macro RELOCATE_CALC_PC32_HI20 method.
>
> 3. Implement the tls le relax function.
>
> bfd/ChangeLog:
>
>     * bfd-in2.h: Add relocs related to tls le relax.
>     * elfnn-loongarch.c:
>     (loongarch_relax_tls_le): New function.
>     (RELOCATE_TLS_TP32_HI20): New macro.
>     (loongarch_elf_check_relocs): Add new reloc support.
>     (perform_relocation): Likewise.
>     (loongarch_elf_relocate_section): Handle new relocs related to relax.
>     (loongarch_elf_relax_section): Likewise.
>     * elfxx-loongarch.c:
>     (LOONGARCH_HOWTO (R_LARCH_TLS_LE_ADD_R)): New reloc how to type.
>     (LOONGARCH_HOWTO (R_LARCH_TLS_LE_HI20_R)): Likewise.
>     (LOONGARCH_HOWTO (R_LARCH_TLS_LE_LO12_R)): Likewise.
>     * libbfd.h: Add relocs related to tls le relax.
>     * reloc.c: Likewise.
> ---
> bfd/bfd-in2.h        |  4 +++
> bfd/elfnn-loongarch.c | 75 +++++++++++++++++++++++++++++++++++++++++++
> bfd/elfxx-loongarch.c | 55 ++++++++++++++++++++++++++++---
> bfd/libbfd.h          |  3 ++
> bfd/reloc.c          |  7 ++++
> 5 files changed, 139 insertions(+), 5 deletions(-)


When this patch was committed, it also added a bfd/.elfnn-loongarch.c.swp
file, and I doubt this was intentional.


Regards
Hannes

  reply	other threads:[~2023-12-29  9:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-28  3:39 [PATCH v5 0/5] LoongArch tls le model linker relaxation support changjiachen
2023-12-28  3:39 ` [PATCH v5 1/5] LoongArch: bfd: Add support for tls le relax changjiachen
2023-12-29  9:53   ` Hannes Domani [this message]
2023-12-29 10:18     ` 常佳琛
2023-12-29 12:39     ` Xi Ruoyao
2023-12-28  3:39 ` [PATCH v5 2/5] LoongArch: include: " changjiachen
2023-12-28  3:39 ` [PATCH v5 3/5] LoongArch: opcodes: " changjiachen
2023-12-28  3:39 ` [PATCH v5 4/5] LoongArch: gas: " changjiachen
2023-12-28  3:39 ` [PATCH v5 5/5] LoongArch: ld: " changjiachen

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=1635652366.9475871.1703843588198@mail.yahoo.com \
    --to=ssbssa@yahoo.de \
    --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=lazy_linux@126.com \
    --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).