From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oo1-xc2e.google.com (mail-oo1-xc2e.google.com [IPv6:2607:f8b0:4864:20::c2e]) by sourceware.org (Postfix) with ESMTPS id 1E3423858423 for ; Wed, 6 Dec 2023 00:33:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1E3423858423 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1E3423858423 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::c2e ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701822816; cv=none; b=QaEBS6so9IKovhGn3aXqne6c3OEXzUfb1O9zP/hfldBPW02CWaCuA9TfOC75rTqHwVKehx+3psB9vli0tgy7epWKjvUnQbzaruOqANSB0+GA+zB1z0ogwMOXnQx4oDL+YUaKPJEmrrNUxO8p+zlZjaFOCUA25xXC45z1lmGUtXw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701822816; c=relaxed/simple; bh=esQayGwInae6fEWFrM5IgXhuTHg7JhLRDWAmeu3Wexw=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=vBQKx+qBLawGH9V3fy1klMEBapS92u2ICINu8zULzoCvTHIKOJjQJr2oZNg8YTVguVqNykP5TfYfON2PkNotLam6zEFyDEwXPsS/eqw1zW3FImDViypghJbZP/vQ4IIaIp0zqKcaMg4CGsckMwYVZuejfKDqn1/qoR9g4hNIG6k= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-oo1-xc2e.google.com with SMTP id 006d021491bc7-58d521f12ebso4208553eaf.2 for ; Tue, 05 Dec 2023 16:33:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1701822813; x=1702427613; darn=sourceware.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=a7oKiicS00hOJ/1gMGPCCE10vbwu/rMJFhSOMwSgrHU=; b=I6ZATXrZkopcXF0oldy7+dk8gZagPcpFFCcey+hmayqCi4nyBAhDtGXGkBpIPwHOvZ eUkprCHlfdNg5rxn6UD0Qe8SuH8nAMsnERAAEVBjUr845+JzpQdL6/lf5JXMpvPx+tJg D0B3oqbRATzbrBLJjqQeL0bfujUlQejW0VW1JUoTIyY/i5wSK0p8spbPKnIdF8Uzfnl+ vqUqavCPCIn/VuYXKUR0rz1wOr8vvtI9wUi4Zn7xecNO5O6+n/WgwCTh7CrP4V/alM6d 1eH9ryiJmSpy3eG+n+Up7u+7yfVvLsaiarPj82udYSySjWl/+BCWyNz6cSbQhv/7zdrP PNMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701822813; x=1702427613; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=a7oKiicS00hOJ/1gMGPCCE10vbwu/rMJFhSOMwSgrHU=; b=IhgNv6VZoBcmDnzUitZdWPYacXsY/pmDul9nMkz5Ctdql22dTJg9vQcQc+5jKaIzIl Fczvcrwj8ku3N5D1khSbdU37OCnbdQ1rYsmnWBUnYdrWdEwVrCeIt1FtmDrWU9kJMdYn 0tr1GizR0OSBYGKrBoXgQNpnep4tnez4IchzDwf+xCRmKBRBhElCqrYWvXCNxs8yrxZt nH6uQeg19LaxJJCI34+JDn94sAL/VcPA3WNi7d1p50gJH7zmg2Py47Zne7hi1cpNRZ1E rEWwvcUMMCWBHffVgKEcuenzaXymFu/AgVgo03bCrKJbf+jqFhdSGSabwdW1nkmiHGxQ RvPg== X-Gm-Message-State: AOJu0YyP6ZALXWDFW3nCabf0Jl+qwNz+8j/k6iVS67B1VHKLnwGvEdJ0 pyUJSPLvEb3She2qZmDaQqYPcjcw6+hOLISBLYIVNA== X-Google-Smtp-Source: AGHT+IH/UCc8MudXURk97MwJI45JgoXTPlHIIaVVTRVq92u+00TF72nqedP8w+0a5s8FZ0UzZGoY98sWfjEKmzp7yGw= X-Received: by 2002:a05:6870:82a9:b0:1fa:ed5a:74c1 with SMTP id q41-20020a05687082a900b001faed5a74c1mr37727oae.36.1701822813429; Tue, 05 Dec 2023 16:33:33 -0800 (PST) MIME-Version: 1.0 References: <20230817180852.121628-2-ishitatsuyuki@gmail.com> <20231128085109.28422-1-ishitatsuyuki@gmail.com> <6EED9B8A-17DB-4963-B0DB-F83BCF72DD9B@gmail.com> In-Reply-To: <6EED9B8A-17DB-4963-B0DB-F83BCF72DD9B@gmail.com> From: Nelson Chu Date: Wed, 6 Dec 2023 08:33:22 +0800 Message-ID: Subject: Re: [PATCH v3 0/9] RISC-V: Implement TLS Descriptors. To: Tatsuyuki Ishi Cc: binutils@sourceware.org, i@maskray.me, Rui Ueyama , Rui Ueyama Content-Type: multipart/alternative; boundary="00000000000043f4d9060bcc80fc" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,HTML_MESSAGE,LIKELY_SPAM_BODY,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --00000000000043f4d9060bcc80fc Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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. On Wed, Dec 6, 2023 at 12:44=E2=80=AFAM Tatsuyuki Ishi wrote: > > On Nov 28, 2023, at 17:51, Tatsuyuki Ishi > 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=3Delf > > With both -mtls-dialect=3Ddesc 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 > > 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 > > > > --00000000000043f4d9060bcc80fc--