Received: by 10.213.65.68 with SMTP id h4csp64615imn; Mon, 12 Mar 2018 06:53:31 -0700 (PDT) X-Google-Smtp-Source: AG47ELte0jlycCzmJ8zFHh1lm+3vti+gfo6L5HozroyX6ORW95Cy4Oylyi5/UKwit/bu7j0Ibiw7 X-Received: by 10.99.119.78 with SMTP id s75mr6853394pgc.238.1520862811451; Mon, 12 Mar 2018 06:53:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520862811; cv=none; d=google.com; s=arc-20160816; b=LfV29mT8s3TBLMvD2WkYKsHEoP3PArT6hu6MXwlm3sFvBYUmkIHn/Md2QUQjp4HpA0 baFUqQskJj3/pBkZbyP7mr8QpL3blhl0e5H7t/57ARmuQSfTnxEDIDSpalfT4F8AiFGc gKGd0oPtRj0evsedeNm7cqywORzIJQPRd/YMjUqKCljAobNf+S2UgbN713tBuQ1Okv0C OnGPF3oXiTyiwW3NknCI3xPfquLOcz7MNfXcExmdH/O0FLPpPpBGUtEForfldgYl+IG/ lWbseNCvJePCT0TkWQ6HuSzy3SS0iBZZQXgyDW0sJSW3cjq0VtiS8v03uYyhCA5788UN NXRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=fqSMdV5oZLRBxm+lzlefaZ+D6ltBZBNP+pnx9Z1fjWI=; b=Ek8HNms2cCJ9an5WOEgydGoZcTjIPjfPaB5vEM9Le3a+Zt2D0icQmWI3sJio9+9RwB 4/ylD+2wXn8/i+mA+xp29BtwEZ5dTvEq0lZo4KyvDGEDfg36ZTLOaErQgiz4HcsUhgw1 V//BJS3LJ1RU9dP1eI+kXmHAHnnfiwJM+Yv7p4c21yrGgAX8l66j+mRiW34dPgLx8EZY M6e2gPa79KeoYWLZsO6ZhTpWI4pz913pYKpMPxNfirE69b7dVumK78TBhn313nfCJaK4 5sJW3QwVcNq+uGzaO3NRaq1NQaLaWGvYMAW1C8cz44pGforb/hWgtyIartVlYbE77a6m VbpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=r3N9vaJX; 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 a9si5031299pgf.172.2018.03.12.06.53.16; Mon, 12 Mar 2018 06:53:31 -0700 (PDT) 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=fail header.i=@gmail.com header.s=20161025 header.b=r3N9vaJX; 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 S1751379AbeCLNwX (ORCPT + 99 others); Mon, 12 Mar 2018 09:52:23 -0400 Received: from mail-qk0-f193.google.com ([209.85.220.193]:38229 "EHLO mail-qk0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751229AbeCLNwV (ORCPT ); Mon, 12 Mar 2018 09:52:21 -0400 Received: by mail-qk0-f193.google.com with SMTP id 132so1523841qkd.5 for ; Mon, 12 Mar 2018 06:52:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=fqSMdV5oZLRBxm+lzlefaZ+D6ltBZBNP+pnx9Z1fjWI=; b=r3N9vaJXeSQdjAtbnBxs38af/DCOumOl76y4sU8+IP9f/7DceJNipikXPZeLPESyjU mutP93AgeY54J0lcALCCvs/encInVNPWpVYMW+ANF8wwU+/14JNHTPfOh7++ePm895XA M03fUaVDFXdWcPOiPfewVOzwzMnQR/UWkSCc1mHZ0YmFTNw2mqRxJ4kcAX1lO5vMpOFd XIDNws1UcLpD4/sPR5+7Fc0UfV4nBOxS0+bsBlq5+nw54qI5U6JVJPIth+C+J7iJ6C4u zcBZdkJnd2xTz+McrzKVVIstZjVcUzoAO+iTYXCEYIkiVZ6mMLEfGgZanFdv9wOwl3HC lOHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=fqSMdV5oZLRBxm+lzlefaZ+D6ltBZBNP+pnx9Z1fjWI=; b=pPDs97/8xLgd+27hKotFv42qyt4xBBWnZcBr3XhjzX6f4KwCG7oHwT7bunriCBcTfm TXGcZfS9C6XpX1XhUeiGpzLl9mUDGayxaJ/wGPhWx9yl2m7j/4td2p0KSCsXjK3aHesT 5NhYKcDxik7LvASGfpzdLVFHHCsf8BzhZUIbqgML3GxZrT6R8kyJ4gZIzxTERVRPcw3V JzaKxvKNZ2DbK7Djla5GWroI+YIXzJTKmHF2bI6Je1cn+lRmFx9PVQOelpH05FJCLvXU R65XPKXIfLDK0yrlYP/O1S6F4ELM3wM/O2/YkantRDvFS8enCMxwq88HUWvUrj8TXb/x BO1Q== X-Gm-Message-State: AElRT7FqCqYs979nF6Gml+Pau5DsYiAZ1TdlTUy9u0sffk460hjsJPYE udGzQVnHMcF2p/rNTMXDx0/iqby3J74cGTgMptU= X-Received: by 10.55.157.76 with SMTP id g73mr11781436qke.107.1520862740852; Mon, 12 Mar 2018 06:52:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.185.46 with HTTP; Mon, 12 Mar 2018 06:52:20 -0700 (PDT) In-Reply-To: References: <20180220215954.4092811-1-arnd@arndb.de> <20180220215954.4092811-2-arnd@arndb.de> From: Arnd Bergmann Date: Mon, 12 Mar 2018 14:52:20 +0100 X-Google-Sender-Auth: VQH5_PGEQ5ARbgwAsX3FHoQs8ZY Message-ID: Subject: Re: [PATCH 1/7] ARM: disallow combining XIP and LTO To: Nicolas Pitre Cc: Andi Kleen , Linux ARM , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 12, 2018 at 3:40 AM, Nicolas Pitre wrote: > On Tue, 20 Feb 2018, Arnd Bergmann wrote: >> Obviously we want to make the combination work, no idea why it doesn't. > > Well, it does work regardless of the noise. Here the nm output is piped > into sed, and the later exits early when it finds what it is looking > for, causing nm to complain about the broken pipe. > > Here's a patch silencing this bogus error message and fixing other minor > issues. > > ----- >8 > Subject: [PATCH] ARM: deflate_xip_data.sh: minor fixes > > Send nm complaints about broken pipe (when sed exits early) to /dev/null. > All errors should be printed to stderr. > Don't trap on normal exit so the trap can return an error code. > > Signed-off-by: Nicolas Pitre Ah, that explains it, thanks! Tested-by: Arnd Bergmann > diff --git a/arch/arm/boot/deflate_xip_data.sh b/arch/arm/boot/deflate_xip_data.sh > index 1189598a25..5e7d758ebd 100755 > --- a/arch/arm/boot/deflate_xip_data.sh > +++ b/arch/arm/boot/deflate_xip_data.sh > @@ -30,7 +30,7 @@ esac > > sym_val() { > # extract hex value for symbol in $1 > - local val=$($NM "$VMLINUX" | sed -n "/ $1$/{s/ .*$//p;q}") > + local val=$($NM "$VMLINUX" 2>/dev/null | sed -n "/ $1\$/{s/ .*$//p;q}") > [ "$val" ] || { echo "can't find $1 in $VMLINUX" 1>&2; exit 1; } > # convert from hex to decimal > echo $((0x$val)) > @@ -48,12 +48,12 @@ data_end=$(($_edata_loc - $base_offset)) > file_end=$(stat -c "%s" "$XIPIMAGE") > if [ "$file_end" != "$data_end" ]; then > printf "end of xipImage doesn't match with _edata_loc (%#x vs %#x)\n" \ > - $(($file_end + $base_offset)) $_edata_loc 2>&1 > + $(($file_end + $base_offset)) $_edata_loc 1>&2 > exit 1; > fi > > # be ready to clean up > -trap 'rm -f "$XIPIMAGE.tmp"' 0 1 2 3 > +trap 'rm -f "$XIPIMAGE.tmp"; exit 1' 1 2 3 > > # substitute the data section by a compressed version > $DD if="$XIPIMAGE" count=$data_start iflag=count_bytes of="$XIPIMAGE.tmp"