From patchwork Thu Aug 17 18:08:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tatsuyuki Ishi X-Patchwork-Id: 13653 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b82d:0:b0:3f2:4152:657d with SMTP id z13csp884003vqi; Thu, 17 Aug 2023 11:09:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGNuX1fJIBUDXCTUGpWb84hI5hXWNveZAHRoBFLEzYKk6emLetlHw5BIdNPByZdoNGLZ4Xj X-Received: by 2002:a05:6512:39c3:b0:4fe:c98:789a with SMTP id k3-20020a05651239c300b004fe0c98789amr65703lfu.37.1692295769061; Thu, 17 Aug 2023 11:09:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692295769; cv=none; d=google.com; s=arc-20160816; b=SiGXDpjV43cZdRVhG21AJAAMWQks+WFP47VleMYRNmGyPPfo7C9nZ6xlhnvHLKPy+a IwC2msyEpEH9soyYQPWb1PsnF4nAds+ujShvEpVAowWazgWM1quh7jOWWK4CmVv++P0I nPqYk9tR6rYf9U0UQQRcE+DHfXHLSK9Tu0NFheGzBYZPtWdjwbnhdIDMeCJPxBT7s1pe jto+Os0e5NFhbBAuJ7V/ult87h2qd6OKqG60AnroqDU8rerOR8jr5o3kcDGq76QRG4go VYjArw1oyVPzaDIG1dWtykavhpU/1r/t0g9fPgJgHXNM8J++ZLPKgvIJeyUEmHyFjXkT bVFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=NK1n+NUvWmdWS22Pikp1ecl/G53wHVpbWbXhdxPU0do=; fh=RnOK2kMt7+DQSwabMVlm0F5hv9+FMo5J9F5oi1ILKLA=; b=OtWFJP09vOagEGuTQfS/kOkp7Y93fpp3ElHijl+doNlp55gUgUXkgXC0zgXPOtbAqF QOLwT2vwQtKvM+btU7Zj2fZHy4etSME26jRy2zpzmVysRiasB/BAudrUwdA1SGvxwzvM WPZxc92hAwiI54w3/KhuuvEezwWJlq3mJMGy8ClYT1YO7ZELQ45tD3H2RnVwZadxV4+R x2YoHy8/sfqU6WXMhWAZsdIkJB6IYlKqQ0I2IBP80j+8myEbLQSIt/i2OJx9Ar7z5Mg5 PBJIR5cIrfh0/vdE2kmDQAXlJkznBS2vpy1xRq+7qJPC3NGCfwjyzietF7cl0hIsGcQV TSmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=CoyjuP8N; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id d12-20020a50fe8c000000b00523ba10ab2bsi49486edt.609.2023.08.17.11.09.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Aug 2023 11:09:29 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=CoyjuP8N; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C7ACE3854178 for ; Thu, 17 Aug 2023 18:09:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C7ACE3854178 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1692295766; 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=CoyjuP8NtVUuUm+xP+W5Ev06PaoYVo0oQ8MkTNTKJ87S0xnIvOCLSZCdB3cIW6wJF tup5ekNiqZr9c+0SkTHL2BzXFfK0ojb55a0IAy+iywKFbt2bFTHqQTCv76Cs8ulW6f FCV4aXa5bwUP00rdhWuT/pAXVOOGiqyGtYqJMtM4= 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 ; 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 ; 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-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 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 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Tatsuyuki Ishi via Binutils From: Tatsuyuki Ishi Reply-To: Tatsuyuki Ishi Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1774500727943734784 X-GMAIL-MSGID: 1774500727943734784 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(-)