Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp243536pxu; Thu, 7 Jan 2021 03:55:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJyVnfBRAKIECyQRiKX0VOi24Z4iP0qN5l0lHQQq6oPxrkqgH04jhDEsj7Z4mCaLvwgs0qe9 X-Received: by 2002:a17:906:b04f:: with SMTP id bj15mr5748053ejb.383.1610020535045; Thu, 07 Jan 2021 03:55:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610020535; cv=none; d=google.com; s=arc-20160816; b=VTVe7XzYjPIJy1qHc80Zhr0SMCACHoqejVyYsOdAkj9aEN8w0gU6WyEqiYtl//rPcy 0JxkaQP+Zl8zzm0S+taDt3fNKbhsNGqimgLHr3dVpowOZiVNohm8MLR8YuReQQF1KqZQ SYfM9/I59P9IOmwLuOVOsW7OulF2AfMvdvvvwAIyl6untz6mgIHxbv4xS02uj9mKZHUO hN2p5m47ONHXzh2p+cw478BZ6BVl6Z2aa6A3JHZQJ1kqCyipHV1dwXkeGZKtVKJYdGrz PPUVFjQ+WrSe2YzdIBO9Q9zqdNpSAHsiendIQY8ji70yIphQDiHPh0ylZibm8/WSzh3E P9Vw== 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 :message-id:subject:reply-to:cc:from:to:dkim-signature:date; bh=DrNPDCI5aGCF7b5CZJNTzFjDzr4fV3uFR8hbRikrekQ=; b=GhuNTeJtldS+C/Ms6lUQFIVp+4txXeQemb7UCiAQI7ked0L20ccpHXFjtWMT2P6Q0Q 7Pb7I0QzuBpvCHYWRpf4mhbQrcgSR2nQiv64oqsKFiECPEpzkGdp2mRMvEdy0uTwBTSY OcVQtWJoJwP6euFJtnDU2qFCbiu0sNBToBNdOkHPxm+bSgeb/qY1IYGPFm334z7DSp4N FTi8HlIOzpFwVvacNfyJ4nQLUs9/mujo2615F24rNoBX9qpCpccCXfssrlWBlkXR4rni HuAXK1Gyi4o4sZO0stYWbyL/nsYev7k0JdEC2nnxETVct/glRKGhFWtgYx0/J01OOnX3 HnKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pm.me header.s=protonmail header.b=JhDu74Cy; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pm.me Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w20si2062740ejc.188.2021.01.07.03.55.11; Thu, 07 Jan 2021 03:55:35 -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=@pm.me header.s=protonmail header.b=JhDu74Cy; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pm.me Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728053AbhAGLwh (ORCPT + 99 others); Thu, 7 Jan 2021 06:52:37 -0500 Received: from mail-40134.protonmail.ch ([185.70.40.134]:64996 "EHLO mail-40134.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726415AbhAGLwh (ORCPT ); Thu, 7 Jan 2021 06:52:37 -0500 Date: Thu, 07 Jan 2021 11:51:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail; t=1610020309; bh=DrNPDCI5aGCF7b5CZJNTzFjDzr4fV3uFR8hbRikrekQ=; h=Date:To:From:Cc:Reply-To:Subject:From; b=JhDu74CyZxiVoZN4SNG2Dkh/eCyKWE5abJFrIB64wNs9O3PTPr/nkrNkFhaTYSz7Q XmIvNsASTb/ZXQRL619zcgYqvc4/EWHculnh8KvIpUQ8zXzeplsUIOYM5RKjI8Duwd ZdqU/SL7kBa298cfB9stEHEqihsfv/TpB7AffQyEDnzHT9MZURxf9XbMggbyxVWkWR thxNXMXZu1k1hU0q9CTeBfInpU9799VtsxvU77sGgYLTSEv1b7TgR1WsaEKRS6R+yG ehOE5mz0aGApWhSAjHEjzQMbq2mp8IA970qAi27WPQp0tsXRRV4iDb37UP5gv0UKS9 R3EMzrTs7FDtg== To: Thomas Bogendoerfer From: Alexander Lobakin Cc: Arnd Bergmann , Nathan Chancellor , Nick Desaulniers , Fangrui Song , Huacai Chen , Pei Huang , Jiaxun Yang , Alexander Lobakin , Sami Tolvanen , Ingo Molnar , 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 Reply-To: Alexander Lobakin Subject: [PATCH v3 mips-next 0/7] MIPS: vmlinux.lds.S sections fixes & cleanup Message-ID: <20210107115120.281008-1-alobakin@pm.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series hunts the problems discovered after manual enabling of ARCH_WANT_LD_ORPHAN_WARN. Notably: - adds the missing PAGE_ALIGNED_DATA() section affecting VDSO placement (marked for stable); - properly stops .eh_frame section generation. Compile and runtime tested on MIPS32R2 CPS board with no issues using two different toolkits: - Binutils 2.35.1, GCC 10.2.0; - LLVM stack 11.0.0. Since v2 [1]: - stop discarding .eh_frame and just prevent it from generating (Kees); - drop redundant sections assertions (Fangrui); - place GOT table in .text instead of asserting as it's not empty when building with LLVM (Nathan); - catch compound literals in generic definitions when building with LD_DEAD_CODE_DATA_ELIMINATION (Kees); - collect two Reviewed-bys (Kees). Since v1 [0]: - catch .got entries too as LLD may produce it (Nathan); - check for unwanted sections to be zero-sized instead of discarding (Fangrui). [0] https://lore.kernel.org/linux-mips/20210104121729.46981-1-alobakin@pm.m= e [1] https://lore.kernel.org/linux-mips/20210106200713.31840-1-alobakin@pm.m= e Alexander Lobakin (7): MIPS: vmlinux.lds.S: add missing PAGE_ALIGNED_DATA() section MIPS: vmlinux.lds.S: add ".gnu.attributes" to DISCARDS MIPS: properly stop .eh_frame generation MIPS: vmlinux.lds.S: catch bad .rel.dyn at link time MIPS: vmlinux.lds.S: explicitly declare .got table vmlinux.lds.h: catch compound literals into data and BSS MIPS: select ARCH_WANT_LD_ORPHAN_WARN arch/mips/Kconfig | 1 + arch/mips/include/asm/asm.h | 18 ++++++++++++++++++ arch/mips/kernel/vmlinux.lds.S | 15 ++++++++++++++- include/asm-generic/vmlinux.lds.h | 6 +++--- 4 files changed, 36 insertions(+), 4 deletions(-) --=20 2.30.0