From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Russell King <rmk@armlinux.org.uk>
Cc: Linux-Next Mailing List <linux-next@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Michael Ellerman <mpe@ellerman.id.au>
Subject: Re: linux-next: build failure after merge of the arm-current tree
Date: Thu, 19 Apr 2018 09:51:55 +1000 [thread overview]
Message-ID: <20180419095155.194217f5@canb.auug.org.au> (raw)
In-Reply-To: <20180418181722.GA7852@flint.armlinux.org.uk>
[-- Attachment #1: Type: text/plain, Size: 2917 bytes --]
Hi Russell,
On Wed, 18 Apr 2018 19:17:23 +0100 Russell King <rmk@armlinux.org.uk> wrote:
>
> Hmm, I guess it's a result of:
>
> # echo $(( ))
> dash: 4: arithmetic expression: expecting primary: " "
>
> which points to the sed expression producing no output. If that's the
> case, then something else went wrong with the build earlier - there
> should be no case where the built vmlinux does not contain the
> __bss_start and __bss_stop symbols on ARM, since every kernel contains
> a .bss section.
>
> Olof's autobuilder shows no errors, but that could be because it's
> using bash - I don't know. kernelci.org also shows no failures.
>
> I think more information is needed to debug this, such as:
>
> - does nm of the vmlinux contain the __bss_start and __bss_stop
> symbols, and are they formatted as one would expect (iow, marked
> as a global BSS symbol?)
$ /opt/cross/gcc-4.6.3-nolibc/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-nm vmlinux | grep __bss_st
008af260 A __bss_start
008b4394 A __bss_stop
so, that's our problem. Note we are building with gcc 4.6.3 and binutils 2.22
> - does the nm | sed pipeline produce the expected output when run
> outside of everything else?
> - does dash evaluate the output correctly outside of the makefile?
so dash returns the above error for 'echo $(( ))' and bash returns '0'
I had to actually symlink /bin/sh to dash to get it to fail - running
with in dash and setting SHELL to /bin/dash was not sufficient.
So under bash, we don't get an error, but we use 0 as the bss length :-(
I will this patch to linux-next today:
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 19 Apr 2018 09:46:22 +1000
Subject: [PATCH] arm: check for A as well as B type sybols when calculating BSS size
older compilers produce those
Fixes: 429f7a062e3b ("ARM: decompressor: fix BSS size calculation")
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
arch/arm/boot/compressed/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
index b0354dfc7055..6a4e7341ecd3 100644
--- a/arch/arm/boot/compressed/Makefile
+++ b/arch/arm/boot/compressed/Makefile
@@ -118,8 +118,8 @@ asflags-y := -DZIMAGE
# Supply kernel BSS size to the decompressor via a linker symbol.
KBSS_SZ = $(shell echo $$(($$($(CROSS_COMPILE)nm $(obj)/../../../../vmlinux | \
- sed -n -e 's/^\([^ ]*\) B __bss_start$$/-0x\1/p' \
- -e 's/^\([^ ]*\) B __bss_stop$$/+0x\1/p') )) )
+ sed -n -e 's/^\([^ ]*\) [AB] __bss_start$$/-0x\1/p' \
+ -e 's/^\([^ ]*\) [AB] __bss_stop$$/+0x\1/p') )) )
LDFLAGS_vmlinux = --defsym _kernel_bss_size=$(KBSS_SZ)
# Supply ZRELADDR to the decompressor via a linker symbol.
ifneq ($(CONFIG_AUTO_ZRELADDR),y)
--
2.17.0
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2018-04-18 23:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-18 3:31 linux-next: build failure after merge of the arm-current tree Stephen Rothwell
2018-04-18 17:54 ` Russell King
2018-04-18 18:17 ` Russell King
2018-04-18 23:51 ` Stephen Rothwell [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-04-10 0:29 Stephen Rothwell
2015-04-10 7:28 ` Russell King - ARM Linux
2015-04-10 8:08 ` Stephen Rothwell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180419095155.194217f5@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=mpe@ellerman.id.au \
--cc=rmk@armlinux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox