Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp12797954rwd; Fri, 23 Jun 2023 10:46:21 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7GCp6+B7/4MgyM2fApZjoZ7HHNUgSR/Iiz27l/ly1WYIsxIFAJk4utxFn79qVbLYPqfJIT X-Received: by 2002:a05:6a21:3281:b0:11f:8a2f:604b with SMTP id yt1-20020a056a21328100b0011f8a2f604bmr23548627pzb.35.1687542381566; Fri, 23 Jun 2023 10:46:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687542381; cv=none; d=google.com; s=arc-20160816; b=AW/rkTVsvLt+cOHz2mwkzhVLTuYkLSr8UJIYo131nuvRsBAL0Ak3h0k89hbzuIme8o AYZnnQf7u7Ynz98M2PtMZ1CbO2YJg2vrqM+4a/CiXFYuyJyx03YoxvwSuXV01CtbJkq8 V4wJhe80GJm6B43PXOak3Gxisynw8oZT4y6wZ10NDWSRXI1B6VU726Zixs0ue5/Woy47 eIUIsOOw57qnQv29OBP3A4Py2KsF0PIgGrjQFojB9Vw7AMlnmq2G80kY4HG8xj8hjWiN oQv6moioLkpaLab+T1uMvmXSDfq5Kps+R7ClcmPasGJIBhBElkKHB6OPXo0jef02+8zk uU5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=/dlM99jTz0gIzWNzHZYae/5UXMHQsT5HyfAPCdNjMdU=; b=Nu/tZVXkovu/4fjUwk/c+XWRbG1jRXKE5aLTVnk/sXuwre6W+C6V+8nAcTCCUkGn4H Jo8KKuyEcII4T1V25YbYlhUTXDTZp1siSW9z3JVMRltrkJ0SwrcJUNDat0os326dfiXB Kt5PwaZQP1Za80+V6k6c3bvVnldoZeWlXmAgvjAQHli0X44lmCz6QSsQsHh3Whnc6CQT JT9JESgOoRX6qwb+4yfRi0hsGa3frAN1JM92VZklp1Kf8oybqr9rys2wAkgptFfyvA0w LmajPUwNwKmjC4xxXhb5J+hCty0lombCbYyNlRRS0r2vHDNIUWKGMpw/mZ3LpaQ96zT4 /mpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=COPFGCbd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a12-20020aa7970c000000b0064feff07372si8903893pfg.195.2023.06.23.10.46.08; Fri, 23 Jun 2023 10:46:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=COPFGCbd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232147AbjFWRBQ (ORCPT + 99 others); Fri, 23 Jun 2023 13:01:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34908 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231610AbjFWRBN (ORCPT ); Fri, 23 Jun 2023 13:01:13 -0400 Received: from mail-qv1-xf34.google.com (mail-qv1-xf34.google.com [IPv6:2607:f8b0:4864:20::f34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E4B0122 for ; Fri, 23 Jun 2023 10:01:02 -0700 (PDT) Received: by mail-qv1-xf34.google.com with SMTP id 6a1803df08f44-62ffdbd6787so7180446d6.0 for ; Fri, 23 Jun 2023 10:01:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1687539661; x=1690131661; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=/dlM99jTz0gIzWNzHZYae/5UXMHQsT5HyfAPCdNjMdU=; b=COPFGCbdWgPfKO7SIIn4+kqMO5nEodbBRgHirG6fr+G2RNp2stfpv2zHZgJnzwR1hX p58W6oyDoyesUbJtbVsW2BVRD0aeUx11FBubT1bovZTNCG6DqP8TdamBo/veYHPjWt41 n52tIQKedLQrGhad+i8tgGSQKftMX6+9b4xZGkX0NbN7S8EMBl0G37bPAF8Y7+odX0Iv SZBvH5iaNE7Nq4a04kyr7LJ/tvQjcU02kbHsGfzM6hcK0yPeKtFXshEbHhJ1z5BvukyP zsiJQGtMBucsf3qyl/SbsxO5AsmoZkygQdxHcrCadqWocK463a2RlZaofv+D25M/aLLm CMVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687539661; x=1690131661; h=content-transfer-encoding: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=/dlM99jTz0gIzWNzHZYae/5UXMHQsT5HyfAPCdNjMdU=; b=BPyRkPg0bWBua/j8GwW3rjDibuDfFiyWwgjvQ0XHYmzhYc67EX8Cc5LsYh039YT05A eF0pRG7IokBdt8+oeP0gjIwIBptGxohd8znQfPUkTHY9KNwxa5c3Lmdbbi+3OzZFkJwf J1QPuJuJVTZB8RLYMwC3kWkwhP/lqSVDb3BWJzAxoQzvFxYkCXPjOyFRFOQ5aSRIwfXg y6vSxQv8Og7rT1T0v8+DIxlebQMZ5pVGgtZK1EVhfzbNpmvTnW5GTPnuSKFNOfF+NhqX VPSAg3VlFJcX/Zf79RYyPL0H0sjgyvCA65egP7DiLkKzQbyTVSvE1B5xobdKTRhIvMK6 KMHA== X-Gm-Message-State: AC+VfDwYJJS5JkJozEI9zOxnNHrqJqD/lWfzg4hGOlmNA5kF7zIFGQtG RFXka0xZnnj4Vn07ztJlrwdBJL3D9nWdcVQwkqKk5Q== X-Received: by 2002:a05:6214:1cc5:b0:62d:e8a2:4d36 with SMTP id g5-20020a0562141cc500b0062de8a24d36mr24611581qvd.61.1687539661135; Fri, 23 Jun 2023 10:01:01 -0700 (PDT) MIME-Version: 1.0 References: <20230620120521.688124-1-masahiroy@kernel.org> In-Reply-To: From: Nick Desaulniers Date: Fri, 23 Jun 2023 10:00:50 -0700 Message-ID: Subject: Re: [PATCH 1/3] modpost: factor out inst location calculation to section_rel() To: Masahiro Yamada Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Nathan Chancellor , Nicolas Schier Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 22, 2023 at 10:38=E2=80=AFPM Masahiro Yamada wrote: > > On Fri, Jun 23, 2023 at 3:25=E2=80=AFAM Nick Desaulniers > wrote: > > > > On Tue, Jun 20, 2023 at 5:05=E2=80=AFAM Masahiro Yamada wrote: > > > > > > diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c > > > index 6e0b8be32648..2551ac9d5bd3 100644 > > > --- a/scripts/mod/modpost.c > > > +++ b/scripts/mod/modpost.c > > > @@ -1519,17 +1512,20 @@ static void section_rel(struct module *mod, s= truct elf_info *elf, > > > r_sym =3D ELF_R_SYM(r.r_info); > > > #endif > > > r.r_addend =3D 0; > > > + > > > + loc =3D sym_get_data_by_offset(elf, fsecndx, r.r_offs= et); > > > > Can we compute `loc` only for the three machine types? > > > > I believe you can compute the location in the same way for any architectu= re > because it is mentioned in ELF spec. Sure, but perhaps it's wasted work for other machine types? --=20 Thanks, ~Nick Desaulniers