Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp106035rwl; Tue, 28 Mar 2023 22:00:03 -0700 (PDT) X-Google-Smtp-Source: AKy350Y9yrnzWUleqL7t5vbN95K3AFL8Ln2rVe/G3AYlytnw0Ne1p30Xb5MnRPKflgHPo9yEpPZe X-Received: by 2002:a05:6a20:4f11:b0:db:ae75:c70e with SMTP id gi17-20020a056a204f1100b000dbae75c70emr1282100pzb.15.1680066003155; Tue, 28 Mar 2023 22:00:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680066003; cv=none; d=google.com; s=arc-20160816; b=v9L4F0vL5zYB+e0tHsP7SDnIiGgx2kIjSoQJq9Cxdo6XburnJfqtIWwoHdMNiFubnM lF3910fI+xehV23UV9mswImSrGw/W6ayREEnRT46X7VWYYp+wPv4gxizFHPchzgohKGz /ZBlSNc4RfqCMo4YM/Q4is/YjT3r6ejLCKd1mailbIbbm7NA/obux0euWapTgdtFY/8c Q3lW/5G3yBZmnzR4PJoRUJ0Ce6NMLAE2stBh6rOdJa2irjrGTNlV+KAtNZooCYbWD1fL 1j1Q09pHTY3J83F+EYKo1BSNZ5K28pFT7JXTGJt2oUa7XMrplPQL+KRB7GEy5eHw4qeT UX8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=EwZQgZuukK5ZcMfwhQ8cOp9XaPAwPgUAMS4WLeQguqk=; b=ye7PpSc78TjDSEmcWgTOhjwel1nBwK64RAh78OFrEew3oM7eb8Vizih/kFXT27KAfP OLu7RNG2sUNqCiRv7BKhMRSqCfdUOg5yJ88gSci0eus8jO9V+HnPAOH/JwNpb9uUE5Za mjcEf8+6jLTeY3v86/J3tBP/qf+G+BTeXSb9GTekaXH2oOEEBr1qzsgczYLSmekSBu9P km4wcrXP2sFpWgNZR1Q9yX5yVlIPw/zDM7WcBHolq8XGjrY7kvxPtSx8uuddpvSeAPnu NI3aV1OlMryN5O6l+zI4PfIUV0l2QIbltcWyq7NmmoD2TaqETJEm4I1pCNRTUNOgLhA2 qSbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20210112.gappssmtp.com header.s=20210112 header.b=E3Z4Yqho; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 69-20020a621948000000b005a908acf445si13598806pfz.101.2023.03.28.21.59.48; Tue, 28 Mar 2023 22:00:03 -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=@rivosinc-com.20210112.gappssmtp.com header.s=20210112 header.b=E3Z4Yqho; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229669AbjC2Ezj (ORCPT + 99 others); Wed, 29 Mar 2023 00:55:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229632AbjC2Ezi (ORCPT ); Wed, 29 Mar 2023 00:55:38 -0400 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A0122D46 for ; Tue, 28 Mar 2023 21:55:37 -0700 (PDT) Received: by mail-wm1-x32e.google.com with SMTP id d11-20020a05600c3acb00b003ef6e6754c5so5202714wms.5 for ; Tue, 28 Mar 2023 21:55:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20210112.gappssmtp.com; s=20210112; t=1680065736; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=EwZQgZuukK5ZcMfwhQ8cOp9XaPAwPgUAMS4WLeQguqk=; b=E3Z4Yqhoin1W8r2t+Jyhb4Jqxbb/dLpgY31WgMC/8f4M9Agb0OzJlakAr0drlghh2B ZtOOx+SrUI2+Y2A2rSR9cMwIRUMF5pNcTOP1QTN3TGiqltjw5qd92s7SeTRGf1Falocp QTJ5ejL81s/SAgZfBKC69BFU2tmVRBauch20G2Y5j6xUaUdlA0SGZopmV6daT6VRNgRI IJS+IFtjoBb0K1xT2ifMxLBr8JTiqs+T8R/Rth3HfyOLzpfjohMpDGfFJaDQgExXIBL/ 5H7bEEdsD0Sy58CqDhf7boCxDSJekNe+SKevoFuOkns50ZDd6e9wroN5P47Q03l4x0Sl VTDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680065736; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EwZQgZuukK5ZcMfwhQ8cOp9XaPAwPgUAMS4WLeQguqk=; b=RxgzMxT8ysSFi7aVcLkb8ytNTZcfp74hh+72sJe7WvtGYFEcySyGFY8OBXyy+m2kBZ YSFnwYcRZCFhvk1A8Wxy/M6UdIzAmxB8U0fiDioQH/qjklyh4jrceilXUamEsTqIRKF9 lpqmjtyYUjGe7HpVNgXohgqBnWEmfAQf4xJ4yZwhWFqjobVj+BkjhJc8zWUPstFs7a2j Ujy3eMhpHnDULKEdtmRQQ5HBBUZbA9iWBGhFeTcu7Le7CinT/mXUueA4SS1V2/QW4g1B f82fkhF3+lKBRcT963d9LAf5ZDUdWXPcv0qWgqDpIakKTRA341He8ORrNHGm7Wu8O9LO 4+5g== X-Gm-Message-State: AO0yUKWZLTrYE63nQgYfa6pXqCtEoCe6cbsuzarU415uv0FjuX5WT0Bj GZjjij8dd1dDGG5OFhYpI1QHVQ== X-Received: by 2002:a7b:cbd2:0:b0:3ee:3e07:5d26 with SMTP id n18-20020a7bcbd2000000b003ee3e075d26mr13763028wmi.24.1680065735865; Tue, 28 Mar 2023 21:55:35 -0700 (PDT) Received: from alex-rivos.home (amontpellier-656-1-456-62.w92-145.abo.wanadoo.fr. [92.145.124.62]) by smtp.gmail.com with ESMTPSA id c1-20020a05600c0a4100b003ee5fa61f45sm840822wmq.3.2023.03.28.21.55.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Mar 2023 21:55:35 -0700 (PDT) From: Alexandre Ghiti To: Nick Desaulniers , =?UTF-8?q?Bj=C3=B6rn=20T=C3=B6pel?= , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Paul Walmsley , Palmer Dabbelt , Albert Ou , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kbuild@vger.kernel.org Cc: Alexandre Ghiti Subject: [PATCH v9 2/6] riscv: Move .rela.dyn outside of init to avoid empty relocations Date: Wed, 29 Mar 2023 06:53:25 +0200 Message-Id: <20230329045329.64565-3-alexghiti@rivosinc.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230329045329.64565-1-alexghiti@rivosinc.com> References: <20230329045329.64565-1-alexghiti@rivosinc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=0.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 This is a preparatory patch for relocatable kernels: .rela.dyn should be in .init but doing so actually produces empty relocations, so this should be a temporary commit until we find a solution. This issue was reported here [1]. [1] https://lore.kernel.org/all/4a6fc7a3-9697-a49b-0941-97f32194b0d7@ghiti.fr/. Signed-off-by: Alexandre Ghiti --- arch/riscv/kernel/vmlinux.lds.S | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/riscv/kernel/vmlinux.lds.S b/arch/riscv/kernel/vmlinux.lds.S index 1c38294580c0..e05e6df44225 100644 --- a/arch/riscv/kernel/vmlinux.lds.S +++ b/arch/riscv/kernel/vmlinux.lds.S @@ -96,10 +96,6 @@ SECTIONS *(.rel.dyn*) } - .rela.dyn : { - *(.rela*) - } - __init_data_end = .; . = ALIGN(8); @@ -126,6 +122,10 @@ SECTIONS *(.sdata*) } + .rela.dyn : { + *(.rela*) + } + #ifdef CONFIG_EFI .pecoff_edata_padding : { BYTE(0); . = ALIGN(PECOFF_FILE_ALIGNMENT); } __pecoff_data_raw_size = ABSOLUTE(. - __pecoff_text_end); -- 2.37.2