Message ID | 20230817180852.121628-2-ishitatsuyuki@gmail.com |
---|---|
Headers |
Return-Path: <binutils-bounces+patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2438D385040B for <patchwork@sourceware.org>; Thu, 17 Aug 2023 18:09:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2438D385040B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1692295787; bh=NK1n+NUvWmdWS22Pikp1ecl/G53wHVpbWbXhdxPU0do=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=Pp7yqSmxn7ZICfkLMkHDOKROetmHhX5ws/UXwF8e6xkikG3KJI3SpkMMPrKroPw9b pc1BMcCa7qFZRDo8yUWtr7N9SQJAQQ3y/1lJtrAoJhQHxW1BbVVr79QUNLpaPeCYzv wTv/l84xyi62E4Yambu3OXtLCAdM7h+PqXJaAVYM= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by sourceware.org (Postfix) with ESMTPS id CCEEC3858D35 for <binutils@sourceware.org>; Thu, 17 Aug 2023 18:09:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CCEEC3858D35 Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-1b89b0c73d7so117355ad.1 for <binutils@sourceware.org>; Thu, 17 Aug 2023 11:09:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692295756; x=1692900556; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=NK1n+NUvWmdWS22Pikp1ecl/G53wHVpbWbXhdxPU0do=; b=UJKGXNsFAxVHgUO9qQ/9HfQ+SpJ3wB1SlN5nugi3hNSzBdEWV74ZfdW9khFFho1VhU Sgr1SG2vmT547sXKu54M/acOFsZK/ntieDcGwWWDZf9ddSU8FhXU4h0WW+7CRFP+QF90 v1V73rplFlUdfdrc5lCztkikw692Ysb4HqkvluwwY0BUNv3zvAAGKCQSiKWuuNu8nLH+ IydyCqVOJ0iynGj5DntbcozPB2UC7d8nG1WMPlk+lwiPHzZdDbRtk7hr8H6fCS+ZQVcZ XimaRitxUvnPzZMtCPF4dtgYRHWgent5T/XWirl+TuhV/feOQOFm9sIXzf8HRnbRx8aj uSfw== X-Gm-Message-State: AOJu0Yw04ogeGGPaNCqXcAourilM/mGh05XZMx0kLi430gkLKfgj1lKQ GA5oxF3mCyfXg9Bx5v5yUQTku7FAkccXv2+e X-Google-Smtp-Source: AGHT+IHZSKeLl0T9UtygrKD1XTOXDYwCqhv/mUSl7mJJ5rIg8on6Iu9JBoRLL4bEMIjB0UwXT+rZmw== X-Received: by 2002:a17:902:d491:b0:1b8:35fa:cdcc with SMTP id c17-20020a170902d49100b001b835facdccmr142106plg.5.1692295756123; Thu, 17 Aug 2023 11:09:16 -0700 (PDT) Received: from localhost (zz20184013906F627101.userreverse.dion.ne.jp. [111.98.113.1]) by smtp.gmail.com with ESMTPSA id c9-20020a170902c1c900b001bde744e9f9sm63352plc.125.2023.08.17.11.09.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Aug 2023 11:09:15 -0700 (PDT) To: binutils@sourceware.org Cc: rui314@gmail.com, ruiu@bluewhale.systems, Tatsuyuki Ishi <ishitatsuyuki@gmail.com> Subject: [PATCH 0/4] RISC-V: Implement TLS Descriptors. Date: Fri, 18 Aug 2023 03:08:33 +0900 Message-ID: <20230817180852.121628-2-ishitatsuyuki@gmail.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list <binutils.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/binutils>, <mailto:binutils-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/binutils/> List-Post: <mailto:binutils@sourceware.org> List-Help: <mailto:binutils-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/binutils>, <mailto:binutils-request@sourceware.org?subject=subscribe> From: Tatsuyuki Ishi via Binutils <binutils@sourceware.org> Reply-To: Tatsuyuki Ishi <ishitatsuyuki@gmail.com> Errors-To: binutils-bounces+patchwork=sourceware.org@sourceware.org Sender: "Binutils" <binutils-bounces+patchwork=sourceware.org@sourceware.org> |
Series | RISC-V: Implement TLS Descriptors. | |
Message
Tatsuyuki Ishi
Aug. 17, 2023, 6:08 p.m. UTC
This patchset implements TLS Descriptors (TLSDESC) for RISC-V targets, per the specification draft at [1]. This patchset is based on top of [2]. No regression in binutils and gcc tests for rv64gc, tested alongside the gcc and glibc implementation (will be posted shortly). 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 [2]: https://sourceware.org/pipermail/binutils/2023-August/129075.html Tatsuyuki Ishi (4): 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. bfd/bfd-in2.h | 4 + bfd/elfnn-riscv.c | 105 ++++++++++++++++++--- bfd/elfxx-riscv.c | 75 ++++++++++++++- bfd/libbfd.h | 4 + bfd/reloc.c | 8 ++ gas/config/tc-riscv.c | 18 +++- include/elf/riscv.h | 5 + ld/testsuite/ld-riscv-elf/ld-riscv-elf.exp | 2 + opcodes/riscv-opc.c | 1 + 9 files changed, 201 insertions(+), 21 deletions(-)
Comments
Hi, Before the reviewing, I think you still should have test cases for each patch to make sure everything is correct in the binutils, and helps people understand what the patches try to resolve what problem or support what features. In general, the regressions in binutils, gcc and glibc are seperate. Besides, each patch should at least have the ChangLogs in the commit message. Thanks Nelson On Fri, Aug 18, 2023 at 2:10 AM Tatsuyuki Ishi via Binutils < binutils@sourceware.org> wrote: > This patchset implements TLS Descriptors (TLSDESC) for RISC-V targets, per > the specification draft at [1]. > > This patchset is based on top of [2]. > > No regression in binutils and gcc tests for rv64gc, tested alongside the > gcc and glibc implementation (will be posted shortly). > > 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 > [2]: https://sourceware.org/pipermail/binutils/2023-August/129075.html > > Tatsuyuki Ishi (4): > 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. > > bfd/bfd-in2.h | 4 + > bfd/elfnn-riscv.c | 105 ++++++++++++++++++--- > bfd/elfxx-riscv.c | 75 ++++++++++++++- > bfd/libbfd.h | 4 + > bfd/reloc.c | 8 ++ > gas/config/tc-riscv.c | 18 +++- > include/elf/riscv.h | 5 + > > ld/testsuite/ld-riscv-elf/ld-riscv-elf.exp | 2 + > This doesn't work, seems still not adding any test cases. > opcodes/riscv-opc.c | 1 + > 9 files changed, 201 insertions(+), 21 deletions(-) > > -- > 2.41.0 > >
On Thu, Aug 17, 2023 at 5:22 PM Nelson Chu <nelson@rivosinc.com> wrote: > > Hi, > > Before the reviewing, I think you still should have test cases for each > patch to make sure everything is correct in the binutils, and helps people > understand what the patches try to resolve what problem or support what > features. In general, the regressions in binutils, gcc and glibc are > seperate. Besides, each patch should at least have the ChangLogs in the > commit message. > > Thanks > Nelson A relocatable object file can contain both TLSDESC and TLS GD relocations (e.g. relocatable output). The GOT use cases are different. It will be nice to have such a test. We need tests for at least (a) -shared and (b) -no-pie or -pie (I prefer just -no-pie). Perhaps you have done this (as the glibc patch suggests), but I want to make sure that the GOT entries are placed in .rela.dyn, not .rela.plt (https://sourceware.org/bugzilla/show_bug.cgi?id=28387 ld: Move R_*_TLSDESC to .rela.dyn) sysdeps/{aarch64,x86_64}/dl-machine.h unfortunately have to handle TLSDESC in elf_machine_lazy_rel for compatibility. > [PATCH 4/4] RISC-V: Initial ld.bfd support for TLSDESC. > + /* TLSDESC needs one dynamic reloc and four GOT slots. * Why is there 4? Other ports reserve 2 GOT slots for one symbol. > On Fri, Aug 18, 2023 at 2:10 AM Tatsuyuki Ishi via Binutils < > binutils@sourceware.org> wrote: > > > This patchset implements TLS Descriptors (TLSDESC) for RISC-V targets, per > > the specification draft at [1]. > > > > This patchset is based on top of [2]. > > > > No regression in binutils and gcc tests for rv64gc, tested alongside the > > gcc and glibc implementation (will be posted shortly). > > > > 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 > > [2]: https://sourceware.org/pipermail/binutils/2023-August/129075.html > > > > Tatsuyuki Ishi (4): > > 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. > > > > bfd/bfd-in2.h | 4 + > > bfd/elfnn-riscv.c | 105 ++++++++++++++++++--- > > bfd/elfxx-riscv.c | 75 ++++++++++++++- > > bfd/libbfd.h | 4 + > > bfd/reloc.c | 8 ++ > > gas/config/tc-riscv.c | 18 +++- > > include/elf/riscv.h | 5 + > > > > > > ld/testsuite/ld-riscv-elf/ld-riscv-elf.exp | 2 + > > > > This doesn't work, seems still not adding any test cases. > > > > opcodes/riscv-opc.c | 1 + > > 9 files changed, 201 insertions(+), 21 deletions(-) > > > > -- > > 2.41.0 > > > >