From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andre Przywara Date: Wed, 18 Dec 2013 15:06:04 +0100 Subject: [U-Boot] "arm: keep all sections in ELF file" breaks Arndale In-Reply-To: <52B0747C.9070503@ti.com> References: <52B06CA1.3020303@linaro.org> <52B06E0A.1020507@ti.com> <52B071FA.8010806@calxeda.com> <52B0747C.9070503@ti.com> Message-ID: <52B1ABCC.8080000@linaro.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 12/17/2013 04:57 PM, Tom Rini wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 12/17/2013 10:47 AM, Andre Przywara wrote: >> (CCing Inderpal, Chander and Minkyu) >> >> On 12/17/2013 04:30 PM, Tom Rini wrote: >> On 12/17/2013 10:24 AM, Andre Przywara wrote: >>>>> Hi, >>>>> >>>>> the Arndale board does not work anymore with current master HEAD. >>>>> If I turn on the board, I see exactly nothing. >>>>> >>>>> I bisected it down to: >>>>> 47ed5dd031d7d2c587e6afd386e79ccec1a1b7f7 is the first bad commit >>>>> commit 47ed5dd031d7d2c587e6afd386e79ccec1a1b7f7 >>>>> Author: Albert ARIBAUD >>>>> Date: Thu Nov 7 14:21:46 2013 +0100 >>>>> >>>>> arm: keep all sections in ELF file >>>>> >>>>> That patch looks like Chinese to me, does one of you have an idea what's >>>>> wrong here? >>>>> Are we missing a section, maybe for the SPL build? >> >> So on Arndale, what file do you boot exactly? It sounds like not >> u-boot.img but some tool stripping / modifying u-boot (or >> spl/u-boot-spl) and having relied on certain sections being stripped out >> before being run. >> >>> Good point. Indeed I boot u-boot-dtb.bin (the SPL is >>> spl/arndale-spl.bin). So the Makefile does: >>> cat u-boot.bin u-boot.dtb >u-boot-dtb.bin >> >>> I guess the address under which U-boot expects to find the attached dtb >>> changes due to the non-discarding. >> >>> Does any of the Arndale people have an idea how to fix this? > > That's a little confusing as we use objcopy -O binary to make > u-boot.bin/u-boot-spl.bin and that would, I would think, drop these > sections anyhow. But some checking of binary size with the patch in > question locally reverted would help shed some light here. So I did objdump -h on ./u-boot, the diff (sorted by the section name, as the order of the section differed, and the size) is: .ARM.attributes 0000002d -.bss 00048b10 +.bss 00048b08 .bss_end 00000000 .bss_start 00000000 .comment 0000001c @@ -14,8 +14,12 @@ .debug_loc 00045a4e .debug_ranges 00006f70 .debug_str 000123b4 +.dynamic 00000080 +.dynstr 0000001d +.dynsym 00000060 .got.plt 0000000c .hash 0000002c +.interp 00000011 .rel.dyn 00006fd8 .rodata 0000ae47 .text 0002cdf0 - works, + is broken. + is HEAD as of yesterday, - is the same with the patch in question reverted. So the patch _adds_ some sections to the file. u-boot-spl is exactly the same, for u-boot-spl.bin the broken version ends earlier (but until then is identical). arndale-spl.bin (which I flash) is different, though. Arndale uses CONFIG_OF_SEPARATE, and .text stays the same AFAICS. I can do some more debugging tomorrow, am grateful for any hints. Regards, Andre.