[U-Boot] [PATCH] zynq: Fix elf header generation

Tom Rini
2014-02-04T20:35:07Z

On Tue, Feb 04, 2014 at 04:59:45PM +0100, Michal Simek wrote:

> This patch is here because of:
> "arm: keep all sections in ELF file"
> (sha1: 47ed5dd031d7d2c587e6afd386e79ccec1a1b7f7)
>
> Our tools expect to have elf with only LOAD header.
> Without this fix also PHDR, INTERP and DYNAMIC headers
> are available in ELF.
>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
[snip]

Two things..

> + /*
> + * Deprecated: this MMU section is used by pxa at present but
> + * should not be used by new boards/CPUs.
> + */
> + . = ALIGN(4096);
> + .mmutable : {
> + *(.mmutable)
> + }

You don't need this do you? If not, drop it..

[snip]
> + /DISCARD/ : { *(.dynsym) }
> + /DISCARD/ : { *(.dynbss*) }
> + /DISCARD/ : { *(.dynstr*) }
> + /DISCARD/ : { *(.dynamic*) }
> + /DISCARD/ : { *(.plt*) }
> + /DISCARD/ : { *(.interp*) }
> + /DISCARD/ : { *(.gnu*) }
> + /DISCARD/ : { *(.ARM.exidx*) }
> + /DISCARD/ : { *(.gnu.linkonce.armexidx.*) }

Here is the difference between your linker script and the main ARM one.
Please add a comment block that explains that you need to discard more
sections because the user is expected to pass this image on to tools
that require them to be dropped so it's clear why there is this delta
between the scripts. Thanks!

--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140204/d3e90e90/attachment.pgp>