Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp389936imn; Thu, 28 Jul 2022 04:04:43 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sUuYl4bdFZQf8bHsRuBaTcRXY9//JR0OX7HVL+RxAsfMHi513j73/U7cTDczuVwN91wH7t X-Received: by 2002:a05:6402:4311:b0:43c:3515:bda2 with SMTP id m17-20020a056402431100b0043c3515bda2mr14743176edc.288.1659006283489; Thu, 28 Jul 2022 04:04:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659006283; cv=none; d=google.com; s=arc-20160816; b=GlefJ+2J7iZ7z+X2NLOqYcTgp7F/9SesVgkNQ8bEwMWpozMahxpHVwgHedg2rrk2w7 D1iI3fByBoUNP2j6ECPcee6XsAn3NuJqccTYGbE+kvd5amaa50pzSDHPmB5l+Seebj2l NaNGQ0K442C+ivXrEuC9EcLvrTfpVq1t7mx5xO5cqHx0ptPyRVOFO92DRLvRpSxg7oy9 gEkB0umSzwrhCnVa8ZrbAWN3y0rnXX1f68mVgIt/zCPrzA+sb6fWxEjeDLvuY8cY3HxE 6DVqb5tlqTK1b/3/dNoie591p99/dDPUF4tcoCLlJxicIRxDR95gv53se6qTeSjIhP+z +pYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=YwxJtAU/9I26rKsWyu5ufYpYPM5ULX0N8qoUu/ZqB6g=; b=fa/A0npEGn4YRsYavbIENpY1wAI7mynrQNIEa2agtpHsQZLASESC5yoODnlzpif6Qo L4MsHK2PCjeAEoQLBDk4OeiOq8MrtJz3TZX0CgcTJqgTzmfawj1JpPFdx9Y5de+EVWD2 5s6fJoI7UQYEkituu++20jI6bq2rlohqVHju5tISF0e1GDQEkUBGxcKLQMzau0jUoGl8 8Xb0E4fBhJQAZlYjZGhff/V/MhNiSzEhknCCIklcQLBrgR41StL/sJFlR4KMEJTrNBa8 FUq0RDpLfRYdlkM0V8+WKCabqThM8pvQiaKpbw3Wos7xw9bsQVK8DLNYQVHW90zV+JAM Ycjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xry111.site header.s=default header.b=bmTP22yW; 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=xry111.site Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x2-20020a1709064bc200b0072ed5a7e546si430365ejv.502.2022.07.28.04.04.18; Thu, 28 Jul 2022 04:04:43 -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=@xry111.site header.s=default header.b=bmTP22yW; 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=xry111.site Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236532AbiG1K5X (ORCPT + 99 others); Thu, 28 Jul 2022 06:57:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236578AbiG1K5S (ORCPT ); Thu, 28 Jul 2022 06:57:18 -0400 Received: from xry111.site (xry111.site [IPv6:2001:470:683e::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76E395C949 for ; Thu, 28 Jul 2022 03:57:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1659005833; bh=21Nfveu2ixaCZpF9J8Q8GYT3B0poeT4atOOmQ/hmP5s=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=bmTP22yWKXXdQoWhFRM23hIUecw7tphRF2bmCs+uE/Pgv3YnrgGvJQgVJvr1awSU0 Ow9b/OQobTNk3VtXzkkJ7PdhoQCCp9QKFdWAs95xIxAFeYOrlOeL4mFfS/VXrju71l +ckxVSq90iEjSGOj7x6103x3E8sVm8sLVV+1bZ4g= Received: from localhost.localdomain (xry111.site [IPv6:2001:470:683e::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id 9D40B667D6; Thu, 28 Jul 2022 06:57:12 -0400 (EDT) Message-ID: <73f83b51eaf40ff1f173059e1f187182db47a1c6.camel@xry111.site> Subject: Re: [PATCH 3/5] LoongArch: Support relocation against _GLOBAL_OFFSET_TABLE_ From: Xi Ruoyao To: Jinyang He , loongarch@lists.linux.dev Cc: linux-kernel@vger.kernel.org, WANG Xuerui , Huacai Chen Date: Thu, 28 Jul 2022 18:57:10 +0800 In-Reply-To: References: <385f63bcbee8e37c42f479ce9cdc7e7d731d419b.camel@xry111.site> <99733532831377ab6585d43ee40bf314a2d4c5a3.camel@xry111.site> <10c1e0f9-8409-a0f4-9b18-a5f56dfb14e1@loongson.cn> <9a79a424a11339ae025539c38fe121104ff00804.camel@xry111.site> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.3 MIME-Version: 1.0 X-Spam-Status: No, score=-0.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FROM_SUSPICIOUS_NTLD, PDS_OTHER_BAD_TLD,SPF_HELO_PASS,SPF_PASS autolearn=no 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, 2022-07-28 at 17:14 +0800, Jinyang He wrote: > Not sure but maybe re-align is needed here. > Since '{BYTE(0)}' actually use 1byte. _GLOABL_OFFSET_TABLE_ may have > difference with really GOT table entry. Have no machine and without=20 > test... :-( BYTE(0) is only for preventing the linker from removing the section.=20 All we want from the linker is a slot for .got in the section table, and the actual property (including size) will be filled at runtime by module_frob_arch_sections. The first GOT entry won't be "appended" after one byte, it is wrote into the start of .got (at runtime). --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University