From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 957FCC433EF for ; Fri, 18 Feb 2022 08:51:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=7ov0ZzGJng1opKPz30jrMDxiBqieTzbt5jdHykJpi5w=; b=H7IrzoVpBmigv2UIvO85UUqvNw 9vcpg84hZ9ANlLboz8js1UUNXoucJ+FR8XrGtEEN6pZlQkDfl8Wmb4V+ZjPth1setKg17KrdkpWtL HxqhpV5eOYlXEOfEaGAOfuGyyuNdl6HAr/snc4ZfieSigzfAsjnUGI4elMB4bO7lcGUiSA5H9OYz3 VHkOPxFAbsBYsLT82y7fUjF7Km5LgvWcpqzQjXWuucWiDq+CLY1NxFqNKw509D9/Hcsv/D/9EBjpB E817DZDBSamru/pDGuHtIx8benvuDdtmIgcV5NRrIRjjb6upR7oEcYKeGsTvrpfvjMnZRf+gIZWd0 AA+7cfTw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nKyyB-00DMiV-F2; Fri, 18 Feb 2022 08:50:27 +0000 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nKyy8-00DMi0-8T for linux-arm-kernel@lists.infradead.org; Fri, 18 Feb 2022 08:50:25 +0000 Received: by mail-pl1-x636.google.com with SMTP id w20so6632502plq.12 for ; Fri, 18 Feb 2022 00:50:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=b7z6iiw22lnHjci/Ii1/zt223km1527nVd9KogEQtMU=; b=seeuPptDfkero5sztHjnfTdR7kAX0RDQ+GXKIYPmD9/YMJP1s/q1+WUrOEvfXGR7S0 2KDZBfbuc6AyrLHQr5yV8jEBMmXJXCcdZ5N6HivQXxMR5W6FVV5diWMQMLAIxpEhlG2M iY/M6jiEV7sn40uD+OfH0H7ZQiTGEqUek1GmoMXA9kc/fF7hsXGbhWqjVNgPvZJjifQA DlR8sjSQC5xn6p3QCtM9E8bfCsH6azPSSjjpUQD6UxKusGPR9G+UzqQ+OyI26qUJS5KO LaHkIN1dwzN66kfSzZnRnOUFkEa1mF6Raq1psC4+zvSNWD5cGF1C7c5lVCX4nCHaf22N dKAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=b7z6iiw22lnHjci/Ii1/zt223km1527nVd9KogEQtMU=; b=DQHooJ3DiRvlUBqtr/U/8+c/AWKjAxkcP4roHw05xrQEQJQp9p6JIZrR81GXGkD2IS U99CoSrBxymqtwyXa+bbQVL7M3TV5Tu+LEWqitq9Xx+bXvOH7OiMRmsXx7cPbOicbgoW mfZQtxxnAXse6i98p+mweOxaO4xT6mWm4FQHul4uiDVRp5tEnt5apAkYzMET2cecaGqf MrVZY+WqzRWWoHejT773id9L2xAjGd94eV27yiUeZcACPMxrHvyIPtfoPvbVYnp1VNmc nJqkDpIZK2wQJ738+7ZL3o/P+68Duu9/N65O5tdsmWE+D5czsOg2W1fqeTbn63msfcsp bZSA== X-Gm-Message-State: AOAM533yRfj9WJhJj9t3Jbe/lLRs4ZAy8DzPcXM+P5/k0NyVsElfIfYW z9oyIsL28KBWGZEKS0Q8GdtFsXPwizATfw== X-Google-Smtp-Source: ABdhPJwpYaB42zV9cx7WtkoPcQKhcNvCEW0vB7/C4F6IE0jCZlGR4uQYV9WGq9VayBg64TbURiE0aQ== X-Received: by 2002:a17:903:31cd:b0:14d:bb40:2a17 with SMTP id v13-20020a17090331cd00b0014dbb402a17mr6448398ple.1.1645174219918; Fri, 18 Feb 2022 00:50:19 -0800 (PST) Received: from google.com ([2620:15c:2ce:200:bdb7:3728:9760:87c]) by smtp.gmail.com with ESMTPSA id d16sm2192602pfj.1.2022.02.18.00.50.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Feb 2022 00:50:19 -0800 (PST) Date: Fri, 18 Feb 2022 00:50:16 -0800 From: Fangrui Song To: Ard Biesheuvel Cc: Catalin Marinas , Will Deacon , Linux ARM , Nathan Chancellor , Linux Kernel Mailing List , llvm@lists.linux.dev Subject: Re: [PATCH] arm64 module: remove (NOLOAD) Message-ID: <20220218085016.jv4qcfaxav5fxhrs@google.com> References: <20220218081209.354383-1-maskray@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220218_005024_326993_2808F61B X-CRM114-Status: GOOD ( 16.75 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2022-02-18, Ard Biesheuvel wrote: >On Fri, 18 Feb 2022 at 09:12, Fangrui Song wrote: >> >> On ELF, (NOLOAD) sets the section type to SHT_NOBITS[1]. It is conceptually >> inappropriate for .plt and .text.* sections which are always >> SHT_PROGBITS. >> >> In GNU ld, if PLT entries are needed, .plt will be SHT_PROGBITS anyway >> and (NOLOAD) will be essentially ignored. In ld.lld, since >> https://reviews.llvm.org/D118840 ("[ELF] Support (TYPE=) to >> customize the output section type"), ld.lld will report a `section type >> mismatch` error. Just remove (NOLOAD) to fix the error. >> >> [1] https://lld.llvm.org/ELF/linker_script.html As of today, "The >> section should be marked as not loadable" on >> https://sourceware.org/binutils/docs/ld/Output-Section-Type.html is >> outdated for ELF. > >This patch lacks a SOB line. > >With one added, > >Acked-by: Ard Biesheuvel Ah, yes. Sorry, I haven't sent a kernel patch for a while... Reported-by: Nathan Chancellor Signed-off-by: Fangrui Song Acked-by: Ard Biesheuvel >> --- >> arch/arm64/include/asm/module.lds.h | 6 +++--- >> 1 file changed, 3 insertions(+), 3 deletions(-) >> >> diff --git a/arch/arm64/include/asm/module.lds.h b/arch/arm64/include/asm/module.lds.h >> index a11ccadd47d2..094701ec5500 100644 >> --- a/arch/arm64/include/asm/module.lds.h >> +++ b/arch/arm64/include/asm/module.lds.h >> @@ -1,8 +1,8 @@ >> SECTIONS { >> #ifdef CONFIG_ARM64_MODULE_PLTS >> - .plt 0 (NOLOAD) : { BYTE(0) } >> - .init.plt 0 (NOLOAD) : { BYTE(0) } >> - .text.ftrace_trampoline 0 (NOLOAD) : { BYTE(0) } >> + .plt 0 : { BYTE(0) } >> + .init.plt 0 : { BYTE(0) } >> + .text.ftrace_trampoline 0 : { BYTE(0) } >> #endif >> >> #ifdef CONFIG_KASAN_SW_TAGS >> -- >> 2.35.1.265.g69c8d7142f-goog >> _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel