From: Dirk Behme <dirk.behme@googlemail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] OMAP3: EVM: Linker errors across tool chain versions
Date: Tue, 14 Dec 2010 16:42:24 +0100 [thread overview]
Message-ID: <4D079060.70104@googlemail.com> (raw)
In-Reply-To: <4D04B4AB.7080405@free.fr>
On 12.12.2010 12:40, Albert ARIBAUD wrote:
> Le 12/12/2010 11:32, Dirk Behme a ?crit :
>
> >> 2. IIRC, the linker emits a warning, not an error. We can live some
> >> time with a warning if it is documented and it is being worked on.
> >
> > With 2009q1-203 it's an error and 'omap3_evm' isn't built:
> >
> > arm-none-linux-gnueabi-ld: section .bss [8003f5e0 -> 8007e33f]
> > overlaps section .rel.dyn [8003f5e0 -> 80044e6f]
> >
> >
> > arm-none-linux-gnueabi-ld: section .dynsym [80044e70 -> 80044f0f]
> > overlaps section .bss [8003f5e0 -> 8007e33f]
> >
> >
> > arm-none-linux-gnueabi-ld: u-boot: section .bss vma 0x8003f5e0
> > overlaps previous sections
> > make: *** [u-boot] Error 1
> >
> > size: './u-boot': No such file
>
> Actually that's not exact. If you do a ./MAKEALL omap3_evm, yes, the
> build will fail. But (with 2010q1 at least, but I d'wager this works
> with 2009q3 as well) a 'make distclean; make omap3_evm_config; make'
> builds despite the linker message.
>
> Can you try this as a diagnostic measure?
>
> Also, you may want to try adding --no-check-sections to the linker
> flags -- again as a diagnostic measure only, not as a fix -- because a
> quick test shows me that the .bin is really different then.
I did a readelf analysis for 3 test cases (with 2009q1-203):
1) As reference, I built 'omap3_beagle' assuming that this is somehow
the ELF file layout we want. Result [1].
2) Build 'omap3_evm' with the 'convert omap3_evm_version to int patch'
from
http://lists.denx.de/pipermail/u-boot/2010-December/083524.html
applied. Result [2].
3) Build 'omap3_evm' without any code patches, but with the additional
linker option --no-check-sections. Result [3].
Looking at (1) and (2) both built fine and the resulting ELF files
have 2 program headers.
In contrast to this, the resulting ELF file for (3) looks totally
different with 3 program headers, an additional one just for .dynsym.
So (3) looks really like a tool chain issue to me. By whatever reason
using 'omap3_evm_version' as a u8 somehow breaks the linking with some
tool chains. Or at least outputs a warning and creates an ELF file
with totally different section headers.
Comparing the resulting ELF file from 'omap3_beagle' (1) to the
version with the int (2) it seems to me that this is what we want.
So I'd like to re-send the int conversion patch from
http://lists.denx.de/pipermail/u-boot/2010-December/083524.html
in a proper format again as a workaround for this issue.
Ok?
Thanks
Dirk
[1] omap3_beagle:
================
...
Number of program headers: 2
Section Headers:
[Nr] Name Type Addr Off Size ES
Flg Lk Inf Al
...
[ 7] .rel.dyn REL 800420c4 0420c4 005af0 08
A 8 0 4
[ 8] .dynsym DYNSYM 80047bb4 047bb4 0000a0 10
A 0 3 4
[ 9] .bss NOBITS 800420c4 000000 031bb4 00
WA 0 0 8
...
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
LOAD 0x008000 0x80008000 0x80008000 0x3fc54 0x3fc54 RWE
0x8000
GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RWE 0x4
Section to Segment mapping:
Segment Sections...
00 .text .rodata .hash .data .got.plt .u_boot_cmd .rel.dyn
.dynsym
01
...
[2] omap3_evm (with 'convert omap3_evm_version to int patch'):
============
...
Number of program headers: 2
...
Section Headers:
[Nr] Name Type Addr Off Size ES
Flg Lk Inf Al
...
[ 7] .rel.dyn REL 8003f5e8 03f5e8 005890 08
A 8 0 4
[ 8] .dynsym DYNSYM 80044e78 044e78 0000a0 10
A 0 3 4
[ 9] .bss NOBITS 8003f5e8 000000 03ed60 00
WA 0 0 8
...
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
LOAD 0x008000 0x80008000 0x80008000 0x3cf18 0x3cf18 RWE
0x8000
GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RWE 0x4
Section to Segment mapping:
Segment Sections...
00 .text .rodata .hash .data .got.plt .u_boot_cmd .rel.dyn
.dynsym
01
...
[3] omap3_evm (code unpatched, with --no-check-sections):
============
...
Number of program headers: 3
...
Section Headers:
[Nr] Name Type Addr Off Size ES
Flg Lk Inf Al
...
[ 7] .rel.dyn REL 8003f5e0 03f5e0 005890 08
A 8 0 4
[ 8] .dynsym DYNSYM 80044e70 044e70 0000a0 10
A 0 3 4
[ 9] .bss NOBITS 8003f5e0 044e70 03ed60 00
WA 0 0 8
...
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
LOAD 0x008000 0x80008000 0x80008000 0x3ce70 0x7bbd0 RWE
0x8000
LOAD 0x044e70 0x80044e70 0x80044e70 0x000a0 0x000a0 R
0x8000
GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RWE 0x4
Section to Segment mapping:
Segment Sections...
00 .text .rodata .hash .data .got.plt .u_boot_cmd .rel.dyn .bss
01 .dynsym
02
...
next prev parent reply other threads:[~2010-12-14 15:42 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-12 8:25 [U-Boot] OMAP3: EVM: Linker errors across tool chain versions Dirk Behme
2010-12-12 10:08 ` Albert ARIBAUD
2010-12-12 10:32 ` Dirk Behme
2010-12-12 11:40 ` Albert ARIBAUD
2010-12-14 15:42 ` Dirk Behme [this message]
2010-12-14 16:01 ` Albert ARIBAUD
2010-12-14 16:14 ` Wolfgang Denk
2010-12-16 13:47 ` Alexander Holler
2010-12-16 14:31 ` Alexander Holler
2010-12-16 15:20 ` Dirk Behme
2010-12-16 16:55 ` Alexander Holler
2010-12-14 16:21 ` Wolfgang Denk
2010-12-16 10:10 ` Dirk Behme
2010-12-17 10:39 ` Dirk Behme
2010-12-30 12:04 ` Premi, Sanjeev
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=4D079060.70104@googlemail.com \
--to=dirk.behme@googlemail.com \
--cc=u-boot@lists.denx.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.