From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yw1-x1136.google.com (mail-yw1-x1136.google.com [IPv6:2607:f8b0:4864:20::1136]) by sourceware.org (Postfix) with ESMTPS id C72C13858D38 for ; Thu, 28 Dec 2023 16:58:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C72C13858D38 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C72C13858D38 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::1136 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703782708; cv=none; b=dzO2RR/IRSUbp+O0GNg+T4P9dgB1dgKlpXkgQ9Y9uHegmSUxCOPmutIvx3gxBt5PBd/qyYMUwTT5005PXCBHG71QIkLJs0m4HfxWJx2y1vCW+m9CC/CWuNxn2TzSb+GOWF96shw7RnsX9pIHLB+ldAD8tlO4Xm5SmOvwYxcaS8M= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703782708; c=relaxed/simple; bh=sDsJuGXrOrscYPNeQjgDLzorh64FJUpA4BtE8ZdcLng=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=cDmFCWutiY/d7JokhcQRMaFMFvqUoCLZ9L+ftrMc5Kqp6ioI/h9v6reYNbJBPD12b7fnLbaoajWWp9crxt448rccMsyL6V12NhGIeqykUgYArCLBBFhwHU82bYBqiFV+Pg1k+uY5vdHcvumYKkYaXFK571edA7L3VGPDXhm2t6c= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-yw1-x1136.google.com with SMTP id 00721157ae682-5ec7a5a4b34so27612887b3.0 for ; Thu, 28 Dec 2023 08:58:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703782703; x=1704387503; darn=sourceware.org; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=9uREqvtkoU25OyEdmSDuIG9ucE5lOi8+rBmyUkYgeu4=; b=jSl+gtciC/YiJ4G5Wh8pbQv83pzYGxeixY3ysNnP8EFXOsUEI0sGF307sy1ewWI9K5 JJrblgdSYADK3P4lKmAp7veux5VZRnmFlqs6zJMUBToKiwuCQnIQlKZTBymd4tQbbp8q YKFrLJzmcMMxIXMM4T3ccs2hMIwMNhc6dyU8nuMqXan6oXpbq9qLY3/ggR1ub0s+EIl5 CDtbGYvZVNqPUEX5AuVkzDMZ8bWrNv6H4H2vDHOp6wuh6i8IbbjyC37bzqyzoFgsPNGA udRT25U4j39wRaKQVlDRd4ZA6HEKVAg2BRvSiqHfBtX4M7QgHseiAY7f1e6s9O+rkbp0 649w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703782703; x=1704387503; h=content-transfer-encoding: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=9uREqvtkoU25OyEdmSDuIG9ucE5lOi8+rBmyUkYgeu4=; b=p2wAaEdF+VMYfq079wRhhKzE94/CDSaooUFU6LzL5RZIAgiDYFsJyop+LMlhaK8hgA UJ3ZM//+X+Llx4SBbzBmzZyjkY31+H9dmznj27Vuq6F8Zw0PrkhmaR71mhnjSCakfI/r WDlgaU6k7VqK2pZ/P+dmOibDfppXTA/B+dfq4cuPYHlGxvVUCXbU1f+eG43gP2zLVA+F gX5bh25ljcm8FcNvFvV5WLYKcPYL2ItY7wESmk2BDq84Bh7GFZ4kF16VlPEvehMXvlv7 Frhj4nolUTONLm8TLC+c1ygTj6kSEsW02KAYzJAbyNnNXyMfyATodApYCD7YfP+0bJN1 /nlg== X-Gm-Message-State: AOJu0YySB/KMj9jJ6gTVMGMWKyVcs7JidpG1qwXHjOMC93xbUTGJEGZZ wvYk+z7w/r5QfugDqiPlTzocOkz9oSSyUoXhEpNIQKEU X-Google-Smtp-Source: AGHT+IFMMe0xlfvUM+5kFJQtlq+i2TNX+SYiAETW6PXc0zDcgVWXBLXACuq33wh+OCY6AfybBKfacVLg+EJzbH5VOo0= X-Received: by 2002:a0d:e382:0:b0:5e1:bd09:9cfd with SMTP id m124-20020a0de382000000b005e1bd099cfdmr7503732ywe.23.1703782703009; Thu, 28 Dec 2023 08:58:23 -0800 (PST) MIME-Version: 1.0 References: <20231228145804.658337-1-hjl.tools@gmail.com> In-Reply-To: <20231228145804.658337-1-hjl.tools@gmail.com> From: "H.J. Lu" Date: Thu, 28 Dec 2023 08:57:46 -0800 Message-ID: Subject: Re: [PATCH 0/4] Support APX relocations To: binutils@sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3015.3 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,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Thu, Dec 28, 2023 at 6:58=E2=80=AFAM H.J. Lu wrote= : > > Implement 3 APX relocations in ld and gold: > > #define R_X86_64_CODE_4_GOTPCRELX 43 > #define R_X86_64_CODE_4_GOTTPOFF 44 > #define R_X86_64_CODE_4_GOTPC32_TLSDESC 45 > > H.J. Lu (4): > x86-64: Add R_X86_64_CODE_4_GOTPCRELX > gold: Handle R_X86_64_CODE_4_GOTPCRELX > x86-64: Add R_X86_64_CODE_4_GOTTPOFF/R_X86_64_CODE_4_GOTPC32_TLSDESC > Gold: Handle R_X86_64_CODE_4_GOTPC32_TLSDESC/R_X86_64_CODE_4_GOTTPOFF > > bfd/bfd-in2.h | 3 + > bfd/elf64-x86-64.c | 196 ++++++++++++++++-- > bfd/libbfd.h | 3 + > bfd/reloc.c | 6 + > elfcpp/x86_64.h | 14 +- > gas/config/tc-i386.c | 38 +++- > gas/config/tc-i386.h | 6 +- > .../gas/i386/ilp32/x86-64-localpic.d | 4 +- > gas/testsuite/gas/i386/x86-64-gotpcrel.d | 12 ++ > gas/testsuite/gas/i386/x86-64-gotpcrel.s | 19 ++ > gas/testsuite/gas/i386/x86-64-gottpoff.d | 19 ++ > gas/testsuite/gas/i386/x86-64-gottpoff.s | 15 ++ > gas/testsuite/gas/i386/x86-64-localpic.d | 4 +- > gas/testsuite/gas/i386/x86-64-localpic.s | 2 + > gas/testsuite/gas/i386/x86-64-tlsdesc.d | 17 ++ > gas/testsuite/gas/i386/x86-64-tlsdesc.s | 13 ++ > gas/testsuite/gas/i386/x86-64.exp | 3 + > gas/write.h | 3 +- > gold/testsuite/Makefile.am | 11 + > gold/testsuite/Makefile.in | 17 ++ > gold/testsuite/x86_64_gd_to_le.s | 1 + > gold/testsuite/x86_64_gd_to_le.sh | 1 + > gold/testsuite/x86_64_ie_to_le.s | 17 ++ > gold/testsuite/x86_64_ie_to_le.sh | 29 +++ > gold/testsuite/x86_64_mov_to_lea.sh | 16 ++ > gold/testsuite/x86_64_mov_to_lea1.s | 1 + > gold/testsuite/x86_64_mov_to_lea2.s | 1 + > gold/testsuite/x86_64_mov_to_lea3.s | 1 + > gold/testsuite/x86_64_mov_to_lea4.s | 1 + > gold/testsuite/x86_64_mov_to_lea5.s | 1 + > gold/x86_64.cc | 193 +++++++++++++---- > include/elf/x86-64.h | 12 +- > ld/testsuite/ld-x86-64/apx-load1.s | 51 +++++ > ld/testsuite/ld-x86-64/apx-load1a.d | 54 +++++ > ld/testsuite/ld-x86-64/apx-load1b.d | 55 +++++ > ld/testsuite/ld-x86-64/apx-load1c.d | 47 +++++ > ld/testsuite/ld-x86-64/apx-load1d.d | 47 +++++ > ld/testsuite/ld-x86-64/tlsbindesc.dd | 49 +++++ > ld/testsuite/ld-x86-64/tlsbindesc.rd | 36 ++-- > ld/testsuite/ld-x86-64/tlsbindesc.s | 39 ++++ > ld/testsuite/ld-x86-64/x86-64.exp | 4 + > 41 files changed, 967 insertions(+), 94 deletions(-) > create mode 100644 gas/testsuite/gas/i386/x86-64-gottpoff.d > create mode 100644 gas/testsuite/gas/i386/x86-64-gottpoff.s > create mode 100644 gas/testsuite/gas/i386/x86-64-tlsdesc.d > create mode 100644 gas/testsuite/gas/i386/x86-64-tlsdesc.s > create mode 100644 gold/testsuite/x86_64_ie_to_le.s > create mode 100755 gold/testsuite/x86_64_ie_to_le.sh > create mode 100644 ld/testsuite/ld-x86-64/apx-load1.s > create mode 100644 ld/testsuite/ld-x86-64/apx-load1a.d > create mode 100644 ld/testsuite/ld-x86-64/apx-load1b.d > create mode 100644 ld/testsuite/ld-x86-64/apx-load1c.d > create mode 100644 ld/testsuite/ld-x86-64/apx-load1d.d > > -- > 2.43.0 > I will check them in shortly. --=20 H.J.