From: jeffy <jeffy.chen@rock-chips.com>
To: Russell King - ARM Linux <linux@armlinux.org.uk>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
chris.zhong@rock-chips.com, Ingo Molnar <mingo@kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] ARM: Fix zImage file size not aligned with CONFIG_EFI_STUB enabled
Date: Mon, 23 Oct 2017 18:24:12 +0800 [thread overview]
Message-ID: <59EDC34C.40109@rock-chips.com> (raw)
In-Reply-To: <20171023085006.GM20805@n2100.armlinux.org.uk>
Hi Russell,
Thanks for your reply.
On 10/23/2017 04:50 PM, Russell King - ARM Linux wrote:
>> >
>> >hmm, right, didn't notice the data is already aligned...
>> >so it's indeed caused by the ksym:
>> >
>> > [ 9] .data PROGBITS 006ce000 6d6000 000200 00 WA 0
>> >0 4096
>> > [10] ___ksymtab+sort PROGBITS 006ce200 6d6200 000008 00 WA 0
>> >0 4
>> > [11] .bss NOBITS 006ce208 6d6208 00001c 00 WA 0
>> >0 4
> It's earlier - look for __ksymtab_strings.
the problem i meet is the appended dtb code found dtb invalid. i thought
that is because of unaligned zImage size, but i was wrong...
it looks like the size is still aligned, and after add more logs, it
seems the problem is due to _edata not matched the real file size, which
is because of the unexpected ___ksymtab+sort:
currently:
zImage size is 6d6208:
-rwxr-xr-x 1 root root 7135752 Oct 23 18:12 zImage
_edata is 006ce200:
006ce200 0 NOTYPE GLOBAL DEFAULT 9 _edata
vmlinux sections:
Section Headers:
[Nr] Name Type Addr Off Size ES Flg
Lk Inf Al
[ 0] NULL 00000000 000000 000000 00
0 0 0
[ 1] .text PROGBITS 00000000 008000 00b7a0 00 AX
0 0 4096
[ 2] .table PROGBITS 0000b7a0 0137a0 000014 00 WA
0 0 4
[ 3] .rodata PROGBITS 0000b7b4 0137b4 0015ef 00 A
0 0 2
[ 4] __ksymtab_strings PROGBITS 0000cda3 014da3 000005 00 A
0 0 1
[ 5] .piggydata PROGBITS 0000cda8 014da8 6c026f 00 A
0 0 1
[ 6] .got.plt PROGBITS 006cd018 6d5018 00000c 04 WA
0 0 4
[ 7] .got PROGBITS 006cd024 6d5024 000028 00 WA
0 0 4
[ 8] .pad PROGBITS 006cd04c 6d504c 000004 00 WA
0 0 1
[ 9] .data PROGBITS 006ce000 6d6000 000200 00 WA
0 0 4096
[10] ___ksymtab+sort PROGBITS 006ce200 6d6200 000008 00 WA
0 0 4
[11] .bss NOBITS 006ce208 6d6208 00001c 00 WA
0 0 4
and it turns out moving around .pad section only hide the problem by
placing the .pad after the ___ksymtab+sort:
Section Headers:
[Nr] Name Type Addr Off Size ES Flg
Lk Inf Al
[ 0] NULL 00000000 000000 000000 00
0 0 0
[ 1] .text PROGBITS 00000000 008000 00b7a0 00 AX
0 0 4096
[ 2] .table PROGBITS 0000b7a0 0137a0 000014 00 WA
0 0 4
[ 3] .rodata PROGBITS 0000b7b4 0137b4 0015ef 00 A
0 0 2
[ 4] __ksymtab_strings PROGBITS 0000cda3 014da3 000005 00 A
0 0 1
[ 5] .piggydata PROGBITS 0000cda8 014da8 6c026f 00 A
0 0 1
[ 6] .got.plt PROGBITS 006cd018 6d5018 00000c 04 WA
0 0 4
[ 7] .got PROGBITS 006cd024 6d5024 000028 00 WA
0 0 4
[ 8] .data PROGBITS 006ce000 6d6000 000200 00 WA
0 0 4096
[ 9] ___ksymtab+sort PROGBITS 006ce200 6d6200 000008 00 WA
0 0 4
[10] .pad PROGBITS 006ce208 6d6208 000008 00 WA
0 0 1
[11] .bss NOBITS 006ce210 6d6210 00001c 00 WA
0 0 4
-rwxr-xr-x 1 root root 7135760 Oct 23 18:09 zImage
006ce210 0 NOTYPE GLOBAL DEFAULT 10 _edata
and i think Ard's new patch could be the right way to fix it :)
next prev parent reply other threads:[~2017-10-23 10:24 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-18 5:01 [PATCH] ARM: Fix zImage file size not aligned with CONFIG_EFI_STUB enabled Jeffy Chen
2017-10-18 6:19 ` Chris Zhong
2017-10-22 11:01 ` Ard Biesheuvel
2017-10-22 12:47 ` Russell King - ARM Linux
2017-10-22 13:01 ` Ard Biesheuvel
2017-10-23 3:26 ` jeffy
2017-10-23 8:50 ` Russell King - ARM Linux
2017-10-23 10:24 ` jeffy [this message]
2017-10-23 10:50 ` Russell King - ARM Linux
2017-10-23 11:45 ` Russell King - ARM Linux
2017-10-24 8:09 ` Ard Biesheuvel
2017-10-24 9:09 ` Russell King - ARM Linux
2017-10-24 9:13 ` Ard Biesheuvel
2017-10-24 9:22 ` Russell King - ARM Linux
2017-10-24 9:26 ` Ard Biesheuvel
2017-10-24 9:30 ` Ard Biesheuvel
2017-10-24 9:38 ` Russell King - ARM Linux
2017-10-24 9:44 ` Ard Biesheuvel
2017-10-24 9:54 ` Russell King - ARM Linux
2017-10-24 10:03 ` Ard Biesheuvel
2017-10-24 9:16 ` jeffy
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=59EDC34C.40109@rock-chips.com \
--to=jeffy.chen@rock-chips.com \
--cc=ard.biesheuvel@linaro.org \
--cc=chris.zhong@rock-chips.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=mingo@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).