Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp2146341ybf; Mon, 2 Mar 2020 02:57:39 -0800 (PST) X-Google-Smtp-Source: APXvYqwEUmlQwEj48Ie0+reYpX+F+cptWc1cOmD+972eLgDMQ5A0gCkznGD/XF6EgcHxM/jSTcIe X-Received: by 2002:a05:6830:2102:: with SMTP id i2mr12269437otc.123.1583146659549; Mon, 02 Mar 2020 02:57:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583146659; cv=none; d=google.com; s=arc-20160816; b=lK1WPE3OP+emCuc3gFRS0YNhZLgEkKLBXW/K5QZnzrimsMBi5swgNEIRu+qwJxj26H f2ImYyV1SON8FvXlFGNuaNsFKybESG4COQkVHGafXsru5Ha2zz0zc3Iai4PMw3DFL5xj KW0CYPL27FqziVyCuaenhw5bbXEN+910Y6MhhVVhHiuAB0lRfI2OAhJT866y0jhRPFSa LrJwEnKNXEmcPrcVFOns+En3VpaaveAm3WVjIpqa1yMww12DWjhivvDXrHX8MNchpZdc TvaLpVaLiGzNqoQw7DUf+NQTkbsgzcAwZisIBfxACqpj4SJMLWOe4PBwOmL7xcEckEVH cY2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:mime-version:user-agent:date:message-id:subject :from:to:dkim-signature; bh=nqMVuyS4CFOxlIAUHG8LbizmYBcid9hPW+nTGezNsFY=; b=rQ6eQ1gNFDMIfroLiu2z784hV0IEAg3XVuXsxsTNM8MA2EQ6ZXTHfSf3xpy9DGX4Dd hTlghc3rBuQ+iJohIr0KwLqSkpWJt1n46Akol0MKj1RjQDDxiThqnKV1jy4hBHcSrqRf rzQRfapD1xUkd1g5Mgb3Q8PifdcxxRXlbDwpv4Yx2PXlGMVxP13MUO9ipmLNjAANK26c +IpPe0t6fa/A2CTs3BIRZDghorQ2pNdB0xPLglkZXB+ghk7hO0qqnS2E1HVAH8U+hf/7 lKNbvikFwjtaN270g9fqehiRn4Q+oXYkbzD1Zb+PyI/3Gu5+Qy6UcNe79BBijkyMGZGB qAbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b="PPIU/iwx"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a10si6363436oia.232.2020.03.02.02.57.27; Mon, 02 Mar 2020 02:57:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b="PPIU/iwx"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727305AbgCBK4J (ORCPT + 99 others); Mon, 2 Mar 2020 05:56:09 -0500 Received: from mail-lj1-f182.google.com ([209.85.208.182]:38948 "EHLO mail-lj1-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727027AbgCBK4J (ORCPT ); Mon, 2 Mar 2020 05:56:09 -0500 Received: by mail-lj1-f182.google.com with SMTP id o15so11198760ljg.6 for ; Mon, 02 Mar 2020 02:56:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=to:from:subject:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=nqMVuyS4CFOxlIAUHG8LbizmYBcid9hPW+nTGezNsFY=; b=PPIU/iwx8iRLuwOH+7C44gxAISsC3e13p6cXyZ4WlrwcTcSTY83YNmjvhQ+005D7LK MBW8hWONjaCZqMq3ippgKLQDW/eR3CWtL3H1azXkh8T0cIJOxnyrwhWvy9VKLu5PbE2L 0pVWiQjom66WsaHJs6EBoaj5Y2TRT7GiJATUQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=nqMVuyS4CFOxlIAUHG8LbizmYBcid9hPW+nTGezNsFY=; b=D1N+YMRI6AOTXxZ505T+M+ZcmohcABvFBl5HEEFqWsl0wqq3Z2610E8n/vYyM7DaKS cPRc3lef77fQMl4+kc2IjY2NQ2Oj0INx+RG82+BuEgPARVosG7AvChlhAFx/3EAgdO8u pCkIgHSWWXHV2GuFAEWcbxSaP+UMEaNS/S0NZdBYvZnDxVcCMIKHvxd8vgPJIEu1p+ER 0FS9sxBn7tcPP9MLPM1XgAkozQI1Rw3UfFC639JlzY0JfhC+6XqBx2XtfaSvr9UWjquu bKigG8IPG3spIbc1QV1qofDtRp7X/s0bJ0bdnhLyVYIQchzbYWzMmp1Dt58EQP7gGncA v+pw== X-Gm-Message-State: ANhLgQ1BrN+sSF5vFAR1OVxrQGGhLnRgZ44R3/cZY59PD3g+2+VaaD4K UYpPmowgtjDQLh7SueUR69XZL16wKwzNR1sV X-Received: by 2002:a2e:a58c:: with SMTP id m12mr10192159ljp.141.1583146566633; Mon, 02 Mar 2020 02:56:06 -0800 (PST) Received: from [172.16.11.50] ([81.216.59.226]) by smtp.gmail.com with ESMTPSA id 67sm7213458ljj.31.2020.03.02.02.56.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 02 Mar 2020 02:56:06 -0800 (PST) To: LKML , Linux Kbuild mailing list , "linuxppc-dev@lists.ozlabs.org" From: Rasmus Villemoes Subject: eh_frame confusion Message-ID: <3b00b45f-74b5-13e3-9a98-c3d6b3bb7286@rasmusvillemoes.dk> Date: Mon, 2 Mar 2020 11:56:05 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I'm building a ppc32 kernel, and noticed that after upgrading from gcc-7 to gcc-8 all object files now end up having .eh_frame section. For vmlinux, that's not a problem, because they all get discarded in arch/powerpc/kernel/vmlinux.lds.S . However, they stick around in modules, which doesn't seem to be useful - given that everything worked just fine with gcc-7, and I don't see anything in the module loader that handles .eh_frame. The reason I care is that my target has a rather tight rootfs budget, and the .eh_frame section seem to occupy 10-30% of the file size (obviously very depending on the particular module). Comparing the .foo.o.cmd files, I don't see change in options that might explain this (there's a bunch of new -Wno-*, and the -mspe=no spelling is apparently no longer supported in gcc-8). Both before and after, there's -fno-dwarf2-cfi-asm about which gcc's documentation says '-fno-dwarf2-cfi-asm' Emit DWARF unwind info as compiler generated '.eh_frame' section instead of using GAS '.cfi_*' directives. Looking into where that comes from got me even more confused, because both arm and unicore32 say # Never generate .eh_frame KBUILD_CFLAGS += $(call cc-option,-fno-dwarf2-cfi-asm) while the ppc32 case at hand says # FIXME: the module load should be taught about the additional relocs # generated by this. # revert to pre-gcc-4.4 behaviour of .eh_frame but prior to gcc-8, .eh_frame didn't seem to get generated anyway. Can .eh_frame sections be discarded for modules (on ppc32 at least), or is there some magic that makes them necessary when building with gcc-8? Rasmus