public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Fangrui Song <i@maskray.me>
To: Nelson Chu <nelson@rivosinc.com>, lazyparser@gmail.com
Cc: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>,
	binutils@sourceware.org,  Rui Ueyama <rui314@gmail.com>,
	Rui Ueyama <ruiu@bluewhale.systems>
Subject: Re: [PATCH v3 0/9] RISC-V: Implement TLS Descriptors.
Date: Wed, 6 Dec 2023 19:35:00 -0800	[thread overview]
Message-ID: <DS7PR12MB57658871C6AD0FA2DB81B8DDCB8BA@DS7PR12MB5765.namprd12.prod.outlook.com> (raw)
In-Reply-To: <CAPpQWtDmhjk+5hcbMVgMEQKZJH+yhCR0yH=C8WOvD_J3Z1ppZg@mail.gmail.com>

On Tue, Dec 5, 2023 at 4:33 PM Nelson Chu <nelson@rivosinc.com> wrote:
>
> Sorry that I don't familiar with the TLS stuff and TLS descriptor, so I will need more time to figure these out if other maintainers are all busy.  Since there are other patches which are also being reviewed, if someone thinks this is an urgent matter, please feel free to let us know, so we can switch to see these first.

I know that Android wants TLSDESC and having TLSDESC in gcc/binutils
helps check LLVM feature parity...
If we have TLSDESC earlier, an OS with a new RISC-V port can make
TLSDESC part of the baseline ABI...

> On Wed, Dec 6, 2023 at 12:44 AM Tatsuyuki Ishi <ishitatsuyuki@gmail.com> wrote:
>>
>> > On Nov 28, 2023, at 17:51, Tatsuyuki Ishi <ishitatsuyuki@gmail.com> wrote:
>> >
>> > This patchset implements TLS Descriptors (TLSDESC) for RISC-V targets, per
>> > the specification (merged) at [1].
>> >
>> > Tested on rv64gc for:
>> > - No regression (& passing new tests) in binutils
>> > - No regression in gcc
>> > - No regression in glibc for subdirs=elf
>> > With both -mtls-dialect=desc and trad.
>> >
>> > This contribution is made on behalf of Blue Whale Systems, which has
>> > copyright assignment on file with the FSF.
>> >
>> > [1]: https://github.com/riscv-non-isa/riscv-elf-psabi-doc/pull/373
>> >
>> > v2: Add changelogs and tests. Minor fixes described in patch messages.
>> > v3: Add relaxation support. This fixes tst-tls1-static in glibc.
>>
>> Would anyone like to review this?  This is a prerequisite for the GCC-side
>> implementation to be useful (especially the gas part).
>
>
>  For these huge features, gcc/binutils/glibc should be reviewed at the same time, since all the stuff should be bound and tested together, so "prerequisite" shouldn't apply here ;)
>
> Thanks
> Nelson

Agreed. I wonder whether Wei can find someone to test
gcc/binutils/glibc patches... and some packages using TLS (e.g.
https://codesearch.debian.net/search?q=__thread&literal=1).

>>
>>
>> I can split up the series into bug fix / refactors and actual changes if
>> desired.
>>
>> > Tatsuyuki Ishi (9):
>> >  RISC-V: Fix local GOT and reloc size calculation for TLS.
>> >  RISC-V: Add TLSDESC reloc definitions.
>> >  RISC-V: Add assembly support for TLSDESC.
>> >  RISC-V: Define and use GOT entry size constants for TLS.
>> >  RISC-V: Initial ld.bfd support for TLSDESC.
>> >  RISC-V: Move STATIC_TLS handling into record_tls_type.
>> >  RISC-V: Unify TLS handling in check_relocs.
>> >  RISC-V: Add elf_link_hash_entry to relax_func args.
>> >  RISC-V: Introduce TLSDESC relaxation.
>> >
>> > bfd/bfd-in2.h                              |   4 +
>> > bfd/elfnn-riscv.c                          | 341 ++++++++++++++++++---
>> > bfd/elfxx-riscv.c                          | 130 +++++++-
>> > bfd/libbfd.h                               |   4 +
>> > bfd/reloc.c                                |   8 +
>> > gas/config/tc-riscv.c                      |  18 +-
>> > gas/testsuite/gas/riscv/tlsdesc.d          |  22 ++
>> > gas/testsuite/gas/riscv/tlsdesc.s          |  24 ++
>> > include/elf/riscv.h                        |  21 +-
>> > include/opcode/riscv.h                     |   1 +
>> > ld/testsuite/ld-riscv-elf/ld-riscv-elf.exp |   8 +
>> > ld/testsuite/ld-riscv-elf/tls.d            |  17 +
>> > ld/testsuite/ld-riscv-elf/tls.s            |  42 +++
>> > ld/testsuite/ld-riscv-elf/tlsbin.d         |   7 +
>> > ld/testsuite/ld-riscv-elf/tlslib.s         |   6 +
>> > opcodes/riscv-opc.c                        |   1 +
>> > 16 files changed, 601 insertions(+), 53 deletions(-)
>> > create mode 100644 gas/testsuite/gas/riscv/tlsdesc.d
>> > create mode 100644 gas/testsuite/gas/riscv/tlsdesc.s
>> > create mode 100644 ld/testsuite/ld-riscv-elf/tls.d
>> > create mode 100644 ld/testsuite/ld-riscv-elf/tls.s
>> > create mode 100644 ld/testsuite/ld-riscv-elf/tlsbin.d
>> > create mode 100644 ld/testsuite/ld-riscv-elf/tlslib.s
>> >
>> > --
>> > 2.43.0
>> >
>>

  reply	other threads:[~2023-12-07  3:41 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-17 18:08 [PATCH 0/4] " Tatsuyuki Ishi
2023-08-17 18:08 ` [PATCH 1/4] RISC-V: Add TLSDESC reloc definitions Tatsuyuki Ishi
2023-08-17 18:08 ` [PATCH 2/4] RISC-V: Add assembly support for TLSDESC Tatsuyuki Ishi
2023-08-17 18:08 ` [PATCH 3/4] RISC-V: Define and use GOT entry size constants for TLS Tatsuyuki Ishi
2023-08-17 18:08 ` [PATCH 4/4] RISC-V: Initial ld.bfd support for TLSDESC Tatsuyuki Ishi
2023-08-18  0:22 ` [PATCH 0/4] RISC-V: Implement TLS Descriptors Nelson Chu
2023-08-18  7:13   ` Fangrui Song
2023-08-31 17:13 ` [PATCH v2 0/5] " Tatsuyuki Ishi
2023-08-31 17:13   ` [PATCH v2 1/5] RISC-V: Fix local GOT and reloc size calculation for TLS Tatsuyuki Ishi
2024-02-21  0:49     ` Nelson Chu
2024-02-21  7:04       ` Nelson Chu
2023-08-31 17:13   ` [PATCH v2 2/5] RISC-V: Add TLSDESC reloc definitions Tatsuyuki Ishi
2023-08-31 17:13   ` [PATCH v2 3/5] RISC-V: Add assembly support for TLSDESC Tatsuyuki Ishi
2023-08-31 17:13   ` [PATCH v2 4/5] RISC-V: Define and use GOT entry size constants for TLS Tatsuyuki Ishi
2023-08-31 17:13   ` [PATCH v2 5/5] RISC-V: Initial ld.bfd support for TLSDESC Tatsuyuki Ishi
2023-11-28  8:51 ` [PATCH v3 0/9] RISC-V: Implement TLS Descriptors Tatsuyuki Ishi
2023-11-28  8:51   ` [PATCH v3 1/9] RISC-V: Fix local GOT and reloc size calculation for TLS Tatsuyuki Ishi
2023-11-28  8:51   ` [PATCH v3 2/9] RISC-V: Add TLSDESC reloc definitions Tatsuyuki Ishi
2024-02-19  0:49     ` Nelson Chu
2024-02-20 17:28       ` Tatsuyuki Ishi
2023-11-28  8:51   ` [PATCH v3 3/9] RISC-V: Add assembly support for TLSDESC Tatsuyuki Ishi
2024-02-19  1:44     ` Nelson Chu
2024-02-20 17:29       ` Tatsuyuki Ishi
2023-11-28  8:51   ` [PATCH v3 4/9] RISC-V: Define and use GOT entry size constants for TLS Tatsuyuki Ishi
2024-02-19  1:57     ` Nelson Chu
2024-02-20 17:32       ` Tatsuyuki Ishi
2023-11-28  8:51   ` [PATCH v3 5/9] RISC-V: Initial ld.bfd support for TLSDESC Tatsuyuki Ishi
2024-02-19  4:33     ` Nelson Chu
2024-02-20 17:36       ` Tatsuyuki Ishi
2023-11-28  8:51   ` [PATCH v3 6/9] RISC-V: Move STATIC_TLS handling into record_tls_type Tatsuyuki Ishi
2023-11-28  8:51   ` [PATCH v3 7/9] RISC-V: Unify TLS handling in check_relocs Tatsuyuki Ishi
2023-11-28  8:51   ` [PATCH v3 8/9] RISC-V: Add elf_link_hash_entry to relax_func args Tatsuyuki Ishi
2023-11-28  8:51   ` [PATCH v3 9/9] RISC-V: Introduce TLSDESC relaxation Tatsuyuki Ishi
2023-12-05 16:44   ` [PATCH v3 0/9] RISC-V: Implement TLS Descriptors Tatsuyuki Ishi
2023-12-06  0:33     ` Nelson Chu
2023-12-07  3:35       ` Fangrui Song [this message]
2023-12-13  0:27         ` Palmer Dabbelt
2023-12-13  1:53           ` Tatsuyuki Ishi
2024-01-27  0:57             ` Fangrui Song
2024-02-20 17:55 ` [PATCH v4 " Tatsuyuki Ishi
2024-02-20 17:55   ` [PATCH v4 1/9] RISC-V: Fix local GOT and reloc size calculation for TLS Tatsuyuki Ishi
2024-02-20 17:55   ` [PATCH v4 2/9] RISC-V: Add TLSDESC reloc definitions Tatsuyuki Ishi
2024-02-20 17:55   ` [PATCH v4 3/9] RISC-V: Add assembly support for TLSDESC Tatsuyuki Ishi
2024-02-20 17:55   ` [PATCH v4 4/9] RISC-V: Define and use GOT entry size constants for TLS Tatsuyuki Ishi
2024-02-20 17:55   ` [PATCH v4 5/9] RISC-V: Initial ld.bfd support for TLSDESC Tatsuyuki Ishi
2024-02-20 17:55   ` [PATCH v4 6/9] RISC-V: Move STATIC_TLS handling into record_tls_type Tatsuyuki Ishi
2024-02-20 17:55   ` [PATCH v4 7/9] RISC-V: Unify TLS handling in check_relocs Tatsuyuki Ishi
2024-02-20 17:55   ` [PATCH v4 8/9] RISC-V: Add elf_link_hash_entry to relax_func args Tatsuyuki Ishi
2024-02-20 17:55   ` [PATCH v4 9/9] RISC-V: Introduce TLSDESC relaxation Tatsuyuki Ishi
2024-02-29  7:06   ` [PATCH v4 0/9] RISC-V: Implement TLS Descriptors Nelson Chu
2024-02-29  7:14     ` Tatsuyuki Ishi
2024-03-29  6:22       ` Tatsuyuki Ishi

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=DS7PR12MB57658871C6AD0FA2DB81B8DDCB8BA@DS7PR12MB5765.namprd12.prod.outlook.com \
    --to=i@maskray.me \
    --cc=binutils@sourceware.org \
    --cc=ishitatsuyuki@gmail.com \
    --cc=lazyparser@gmail.com \
    --cc=nelson@rivosinc.com \
    --cc=rui314@gmail.com \
    --cc=ruiu@bluewhale.systems \
    /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).