Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp1942184pxb; Sun, 10 Jan 2021 17:30:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJwqABrB0NPETSfwe6nrrrBjsieyMhmwGq/AqlP4YiCuztrKqdBFAXn+7TvmaEiGuNOkdi86 X-Received: by 2002:a17:907:4271:: with SMTP id nq1mr9150458ejb.358.1610328619998; Sun, 10 Jan 2021 17:30:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610328619; cv=none; d=google.com; s=arc-20160816; b=RfMkf1Zn4/t80uvxyeX574WWcQcAEX/CliUMklao+T0bFIE8/UqSidXZzj+n8CGJjd t3yKVE0imV3ZL0waty+wZvgRxmAKt3muGVGdFDoxp6cAIGW283Jakmt1bZPJCMoc5qUa VvA2X1oYhxKYFKopqMgqb4x1I855N2zd68urKzAJVwEoes3CVFSCAWCLYP9ec6HNS57O uBzvBjGTX2kcpvwGVxaDhxq5gtRhmAPdXhmw91ylsdWmBQNtGmqMdZrVZ3d6l4i9rPf1 cS1gRTrAEspYUzO3WOiNE6HtTwJvJjDojS2XnYYMk1szgE3pUHyCpjWq6fTjLdn84/Wy Po5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=RAxSHTZDZlT6yDjj0fm6U/ExdlmA3H8wyIJvn7l+DzI=; b=jBFPrGeWE1qCdIv/SHcz/sQo1VKg78uqbXbVFA4GoPWKldp5rGpkkfKlS1g3zx3VB2 Q6GYLmb9BBiGg1MIkFHLEFOj7FasbcYp/BKU2zq7qpla7e5nh0fwEkjACS1agIS3Anre TZYpXYumjY9lVCTWyDcW4cTAXbiSZBhntUsAiMmcDs0gkr64CfDM25sGnRblRFrkw4L9 jiBsykUzkjNYOkj3QJcSPjZCWZB+FNZnciZSbWme3xxh7niU4IWjyLvw5MDtH6cpyy6I vMxmWlU9nmef0zORYg9IqsLXHopAwvZ7XbB1YW1U8EHatY93FUXyrwRG2ZBwrrgoXAA1 1Vlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="qSv/Xpjf"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mj22si6183514ejb.215.2021.01.10.17.29.56; Sun, 10 Jan 2021 17:30:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="qSv/Xpjf"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727072AbhAKB2y (ORCPT + 99 others); Sun, 10 Jan 2021 20:28:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726151AbhAKB2x (ORCPT ); Sun, 10 Jan 2021 20:28:53 -0500 Received: from mail-il1-x133.google.com (mail-il1-x133.google.com [IPv6:2607:f8b0:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84306C061786; Sun, 10 Jan 2021 17:28:13 -0800 (PST) Received: by mail-il1-x133.google.com with SMTP id e7so1532598ili.2; Sun, 10 Jan 2021 17:28:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=RAxSHTZDZlT6yDjj0fm6U/ExdlmA3H8wyIJvn7l+DzI=; b=qSv/XpjfVT/EuN9MhavzUKyDjfAu2YH8znDEpJAL4hh2eaUqLmi/aRqM+mSHmNsc8S NlVdtopuesiO8cs4IM2xmvXTDoW6AYlEleBpmMS+2H7+UphFBa7DtArJELLVFnjKTey5 AxIDqkE62mF0gxHkuZcOUF3+DwNt86h/RT7X4idOVscFCSjs2sSuCqt/3kYxqebsQDGy HKncjElq4v7GpGuVhSNZwHPZgsCvuYMgPwUKb2M6ssmjVQ7eSTAozjkln9IchTwaEhcJ j/gohOag6umPBdfhpBEpKMtpqfPRuCcL1/wOy4tDhJWtIUBt0B+PaZRJhQocTTaAqkX7 xhhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=RAxSHTZDZlT6yDjj0fm6U/ExdlmA3H8wyIJvn7l+DzI=; b=LE8PrOwfhbvKEwnItVw5bSDw7wnwkIhMRjKTb0f+YLyY5CSiJBm2E85J+ZVk//q8Wc yS+yuITNaRgTUUH1poXFfuLZtnLk9gzjCsYG2gXtkyjinpsAYYM9iuYiNvzhafhLGF4c GBoakPRi9e+MXE6ND4O/1rVpfDEytaWh8okXXBRhb7g10FmBaJi6bsr6c9mULBzly54/ ubNfM6AfDwAvucvhSDQyu76CKoIC+JCspPHYN0BN7QIA5stBfFySW9Pep2xGGVeEqCtA Ovuo5hjg/TnnDt8l893/UfHKiwzFm9pD/qErPO4+8XfsZ4iE8pb6unmS+Odi4Kgs1Hbc bn3A== X-Gm-Message-State: AOAM530zIkU0mrAPq1H6oFpFbOIW8luy42hMt6NQJ+KCMQzq0YR5RwG3 0DG+d8tKdMJYTbu+pufuPNM= X-Received: by 2002:a92:9f0a:: with SMTP id u10mr14002915ili.158.1610328492662; Sun, 10 Jan 2021 17:28:12 -0800 (PST) Received: from ubuntu-m3-large-x86 ([2604:1380:45f1:1d00::1]) by smtp.gmail.com with ESMTPSA id b12sm14065824ilc.21.2021.01.10.17.28.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Jan 2021 17:28:11 -0800 (PST) Date: Sun, 10 Jan 2021 18:28:09 -0700 From: Nathan Chancellor To: Alexander Lobakin Cc: Thomas Bogendoerfer , Arnd Bergmann , Nick Desaulniers , Huacai Chen , Pei Huang , Kees Cook , Fangrui Song , Jiaxun Yang , Ralf Baechle , Corey Minyard , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, stable@vger.kernel.org, clang-built-linux@googlegroups.com Subject: Re: [PATCH v5 mips-next 5/9] MIPS: vmlinux.lds.S: explicitly catch .rel.dyn symbols Message-ID: <20210111012809.GA2918900@ubuntu-m3-large-x86> References: <20210110115245.30762-1-alobakin@pm.me> <20210110115546.30970-1-alobakin@pm.me> <20210110115546.30970-5-alobakin@pm.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210110115546.30970-5-alobakin@pm.me> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jan 10, 2021 at 11:56:34AM +0000, Alexander Lobakin wrote: > According to linker warnings, both GCC and LLVM generate '.rel.dyn' > symbols: > > mips-alpine-linux-musl-ld: warning: orphan section `.rel.dyn' > from `init/main.o' being placed in section `.rel.dyn' > > Link-time assertion shows that this section is sometimes empty, > sometimes not, depending on machine bitness and the compiler [0]: > > LD .tmp_vmlinux.kallsyms1 > mips64-linux-gnu-ld: Unexpected run-time relocations (.rel) detected! > > Just use the ARM64 approach and declare it in vmlinux.lds.S closer > to __init_end. > > [0] https://lore.kernel.org/linux-mips/20210109111259.GA4213@alpha.franken.de > > Reported-by: Thomas Bogendoerfer > Signed-off-by: Alexander Lobakin Reviewed-by: Nathan Chancellor > --- > arch/mips/kernel/vmlinux.lds.S | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S > index 10d8f0dcb76b..70bba1ff08da 100644 > --- a/arch/mips/kernel/vmlinux.lds.S > +++ b/arch/mips/kernel/vmlinux.lds.S > @@ -137,6 +137,11 @@ SECTIONS > PERCPU_SECTION(1 << CONFIG_MIPS_L1_CACHE_SHIFT) > #endif > > + .rel.dyn : ALIGN(8) { > + *(.rel) > + *(.rel*) > + } > + > #ifdef CONFIG_MIPS_ELF_APPENDED_DTB > .appended_dtb : AT(ADDR(.appended_dtb) - LOAD_OFFSET) { > *(.appended_dtb) > -- > 2.30.0 > >