[U-Boot] "arm: keep all sections in ELF file" breaks Arndale

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 albert.u.boot@aribaud.net 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?
Regards, Andre.

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
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 albert.u.boot@aribaud.net 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.
- -- Tom

(CCing Inderpal, Chander and Minkyu)
On 12/17/2013 04:30 PM, Tom Rini wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
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 albert.u.boot@aribaud.net 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?
Regards, Andre.
Tom -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQIcBAEBAgAGBQJSsG4KAAoJENk4IS6UOR1Wd0gP/jve70MGVIbZ7I6ZNVfBMXlC kUCrbskbSSNhLvp+prf7X4YGAqGkqzHm2kbdPS1BC3nEDbpJxvQodN1DYDat8I9U 7Et3fMLqpWzRSs/8FyN6ISDfo/hn4DSKKLRlHi/sg4RWYhDWIfwNByyVN2Hcpicb grUqz27GoJbTWld8ojkDCRILYS22RgCXQCdpnDvDv+a1Yvx6pb2/etH2VykOnFdN FVz0vHr7ecGbDgLuK7elKR0aJhyXkU8z6w2TAW713d+MkXkuHytbO8d4DtIysRrj L7quOdVH5qWyY8UivMZbSWU/UfExu6lGF8HhzlebWc2x80Ghhyxyc8i0/PpmEL20 n5rrBAAPNBKbbN5YlhZ4XnXIbp8o9FFI6rvXj/Gx6sfbU14BtYkkYnc5IeEz2RcK dMXYycAdp+7ZzYoMGUYOBR+GCTQ38f0ZFJgkOlmYgShPYEHDMNrW40SKm2zR7xPR LpQ/YI1XzkuAdoQ6+Plx/Felf5KTS8ul3y55PqWPr8UFcFCggG84WL/aTOsVxCnL 6CM7h4RY0ainSHUw431JoPdILcYQIbJz84vo8hOoIdlXX3+dffSHH0g6Eg4QRHEO 75UK0JMXCHUhg519dy8OEPYwi8jZOlDyx+lEqbhaTYorXxYJzCZmTOpWFVarix7c fhyXLvN+llrt1v3mjgbb =siI2 -----END PGP SIGNATURE-----

-----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 albert.u.boot@aribaud.net 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.
- -- Tom

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 albert.u.boot@aribaud.net 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.

Hi Andre,
On Wed, 18 Dec 2013 15:06:04 +0100, Andre Przywara andre.przywara@linaro.org wrote:
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 albert.u.boot@aribaud.net 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.
Sorry for chiming in late. Did you try this?
http://patchwork.ozlabs.org/patch/300928/
Amicalement,

On 12/21/2013 11:46 AM, Albert ARIBAUD wrote:
Hi Andre,
On Wed, 18 Dec 2013 15:06:04 +0100, Andre Przywara andre.przywara@linaro.org wrote:
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 albert.u.boot@aribaud.net > 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.
Sorry for chiming in late. Did you try this?
I cannot reach the server. Can you give me a hint what this patch is about (or a Subject: line to search for on the ML?)
Thanks, Andre.

On 12/21/2013 09:57 PM, Andre Przywara wrote:
On 12/21/2013 11:46 AM, Albert ARIBAUD wrote:
Hi Andre,
On Wed, 18 Dec 2013 15:06:04 +0100, Andre Przywara andre.przywara@linaro.org wrote:
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 albert.u.boot@aribaud.net >> 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.
Sorry for chiming in late. Did you try this?
I cannot reach the server. Can you give me a hint what this patch is about (or a Subject: line to search for on the ML?)
OK, now the server works again. Looks like this could fix it on the first glance, but I momentarily cannot test this. Will try to do this ASAP.
Thanks, André.

Hi,
I have also problem with this patch but from the other side. Tool for booting image generation expects that LOAD section is the first. That's why I have to remove PHDR, INTERP sections. Not sure about DYNAMIC section which is also there but behind LOAD section.
I can easily create zynq private linker script but maybe there is better way how to remove these section for us via LDFLAGS_FINAL in config.mk. Unfortunatelly I haven't found how to do it.
Can someone know if it is possible to remove some sections via ld command line?
Thanks, Michal

On 12/21/2013 11:46 AM, Albert ARIBAUD wrote:
Hi Andre,
On Wed, 18 Dec 2013 15:06:04 +0100, Andre Przywara andre.przywara@linaro.org wrote:
> 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 albert.u.boot@aribaud.net > Date: Thu Nov 7 14:21:46 2013 +0100 > > arm: keep all sections in ELF file >
....
Albert,
Sorry for chiming in late. Did you try this?
OK, got around to test this now, it indeed fixes the issue for me. In this original thread of yours you mentioned a v2, has this been sent out yet? Please make sure to push this patch into the release, otherwise we will have a regression with Arndale (and others).
Thanks, Andre.
participants (5)
-
Albert ARIBAUD
-
Andre Przywara
-
Andre Przywara
-
Michal Simek
-
Tom Rini