Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp3228476ybf; Tue, 3 Mar 2020 01:59:33 -0800 (PST) X-Google-Smtp-Source: ADFU+vtRfcQm+1L86u0CjUqOzUsx9gYgx8J0VFr421Ux7pAJzA0b6wKhNYc5n3yazmoyvfcNgLFb X-Received: by 2002:aca:bfc6:: with SMTP id p189mr1902663oif.21.1583229573743; Tue, 03 Mar 2020 01:59:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583229573; cv=none; d=google.com; s=arc-20160816; b=bEgpVxQkpVtmr8g+U4SXJqGJa71Ae+cC9hiq2lbOCTCtNqRa+zPgQABu8eKDik3nYb NFNHjGFJWgAunCk/+fKuzcBnc2jvU+1OU2DtWPv2xhqRpjKycufRgcZ19fAHr0gba0Lc B8+di9LzOw3LDEoldjnvasL4pIKTm1l1yOY8meZsefQ/8rlxO/EdOsi4z1AmHDsqo7vC 44b3Nf2NUxZ2rrWoAhKX1wiovA5yo0C7HmGtfG4jwcnuWw2+iqzVm0uuzKLNuyh4POed LZM2NNvwb3yR43OCoBJsPuG38hkVoGt05+unEJaTGq2vH2mViWDGFZ/dW0bSVjsuDJr/ PzbQ== 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:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:dkim-signature; bh=+pqUVa+iJKiYfmtbwFgOUkAfBLkxAe1OkEI8zp9rAOM=; b=sEijixXEsyCGuIDCGx7m5NXZ6ItbXjpIAyHq1K8RQTThRrk7dI5kunluLv2df7PN4L n1sVzgLDiOtJ3mp4RbQ18LXfGmVEpJCNLQ0JPYTQJ2dF7mEkE43mYkjJKM65kf/WBX3+ uX1W/tVlEU+SYJjcUdOsTsCV/2amEEgznoDDT9RdQYqlWcf42x+g7FSykbhpdI/bASmU lrTpskv+o4caTNYBgtp7K7Grir8rEQZ19Aq6TpDKF6WvqqOuHfCTqIqt+i7K+c+f+n5a bWjth8KagLlipc5B8iFpiLdQSljzddaZMkMImChtxDWi45yxnbsXqSOF5BzKKds91C/p dhLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=ZxaMTWs2; 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 m67si7573116oib.117.2020.03.03.01.59.21; Tue, 03 Mar 2020 01:59:33 -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=ZxaMTWs2; 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 S1728349AbgCCJuN (ORCPT + 99 others); Tue, 3 Mar 2020 04:50:13 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:42036 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728346AbgCCJuN (ORCPT ); Tue, 3 Mar 2020 04:50:13 -0500 Received: by mail-lj1-f194.google.com with SMTP id q19so1849603ljp.9 for ; Tue, 03 Mar 2020 01:50:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=+pqUVa+iJKiYfmtbwFgOUkAfBLkxAe1OkEI8zp9rAOM=; b=ZxaMTWs2PhvP02bSlCREiq8B2pCaEG1FDmQey3np0Y3cOhBemusIY+fwbWw25gSUNa h2mhj89Mt8TCJ8Qi0hUnHnmMdpNTX4zjQEgAb9v7JnQqKzDBN85eINkJIvna0BCet6Jm VH+IR8wTtDn7WVRK9BsoPE5J1hib2/3KvG9e0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=+pqUVa+iJKiYfmtbwFgOUkAfBLkxAe1OkEI8zp9rAOM=; b=jTGsRP1WfHV9DsBfPR0z6+as+9T6igLQiJ76LJ62AaStOF05qbuPoepBGFH3kYrovF pUoYbJD4hyU9i+9pvlGFVMfVuRzrtsFtY77UudSZgdrEIhrqptOPN7LIH31jEpVYjW/M IDV+ZQ/Xj8DJeeevP0DrxD4RC25lhmDj2zOml/33kw6NKy4czLk1nx1PpOEcnJ14pnnT K/EpK7wfmEj6BErYuIC4+M/OzNLkRFnqIEjFji4munpjsPfVVCQkH4E7CI+GCuluJ1wz N6TTX+TN5X6RU0au77W8uI/wjzR33Rotk4kSoSr0vn/tRO8ycvkcMca80E/9IBAD67WI uACQ== X-Gm-Message-State: ANhLgQ1PzJmgMam24jlb4mRpHIXb7gM2sXMHROzwJaKmfKH06/oRkaQ2 CYpFo/AyPcU4tLlXOgMFdAB306Uz/0OOPDKh X-Received: by 2002:a2e:9ca:: with SMTP id 193mr1862293ljj.283.1583229008833; Tue, 03 Mar 2020 01:50:08 -0800 (PST) Received: from [172.16.11.50] ([81.216.59.226]) by smtp.gmail.com with ESMTPSA id n12sm234615ljm.69.2020.03.03.01.50.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 03 Mar 2020 01:50:08 -0800 (PST) Subject: Re: eh_frame confusion To: "Naveen N. Rao" , Linux Kbuild mailing list , LKML , "linuxppc-dev@lists.ozlabs.org" , Michael Ellerman , Segher Boessenkool References: <3b00b45f-74b5-13e3-9a98-c3d6b3bb7286@rasmusvillemoes.dk> <1583168442.ovqnxu16tp.naveen@linux.ibm.com> <1583169883.zo43kx69lm.naveen@linux.ibm.com> From: Rasmus Villemoes Message-ID: <9c9f79e3-d355-1c8a-fb5b-169aab2945da@rasmusvillemoes.dk> Date: Tue, 3 Mar 2020 10:50:06 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <1583169883.zo43kx69lm.naveen@linux.ibm.com> Content-Type: text/plain; charset=utf-8 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 On 02/03/2020 18.32, Naveen N. Rao wrote: > Naveen N. Rao wrote: >> Michael opened a task to look into this recently and I had spent some >> time last week on this. The original commit/discussion adding >> -fno-dwarf2-cfi-asm refers to R_PPC64_REL32 relocations not being >> handled by our module loader: >> http://lkml.kernel.org/r/20090224065112.GA6690@bombadil.infradead.org >> >> However, that is now handled thanks to commit 9f751b82b491d: >> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9f751b82b491d >> >> >> I did a test build and a simple module loaded fine, so I think >> -fno-dwarf2-cfi-asm is not required anymore, unless Michael has seen >> some breakages with it. Michael? >> >>> >>> 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? >> >> As Segher points out, it looks like we need to add >> -fno-asynchronous-unwind-tables. Most other architectures seem to use >> that too. Yes. Thanks, Segher, that explains that part. > Can you check if the below patch works? I am yet to test this in more > detail, but would be good to know the implications for ppc32. I'll see if that produces a bootable kernel, but I think I'd prefer a more piecemeal approach. One patch to add -fno-asynchronous-unwind-tables (given that other arches do it unconditionally I don't think cc-option is needed), with a commit log saying something like "no-op for gcc < 8, prevents .eh_frame sections that are discarded anyway for vmlinux and waste disk space for modules". Then another patch can get rid of -fno-dwarf2-cfi-asm if that's no longer required. Rasmus