public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Joey Oravec <joravec@drewtech.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] ld fails with .bss / .rel.dyn overlap for 2011.12
Date: Mon, 09 Apr 2012 17:00:57 -0400	[thread overview]
Message-ID: <4F834E09.3010600@drewtech.com> (raw)

This email is to report a problem building u-boot 2011.12 with a gcc 
4.3.2 toolchain. I've added support locally for a marvell 78xx0 based 
board. It's using arm926ejs and I have not modified the *.lds linker script.

Case 1: With gcc 4.3.2 provided by marvell, the build fails with this error:

arm-mv5vfp-linux-gnueabi-ld: section .bss [00000000fffbba08 -> 
00000000fffc3137] overlaps section .rel.dyn [00000000fffbba08 -> 
00000000fffbeea7]
arm-mv5vfp-linux-gnueabi-ld: section .dynsym [00000000fffbeea8 -> 
00000000fffbef57] overlaps section .bss [00000000fffbba08 -> 
00000000fffc3137]
arm-mv5vfp-linux-gnueabi-ld: u-boot: section .bss lma 0xfffbba08 
overlaps previous sections
make: *** [u-boot] Error 1

Through trial-and-error, I found that this error only occurs when .bss 
is unaligned. In my example .bss is only 2-byte aligned and u-boot.map 
indicates that the linker added 2-bytes of zero fill at the end of bss. 
If I add a global unsigned short so .bss is 4-byte aligned the error 
goes away and gcc produces a good binary.

Case 2: With gcc 4.6.3 built with crosstool-ng, the build has no problem.

I can provide u-boot.map files (~70k) for each case.

-joey

             reply	other threads:[~2012-04-09 21:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-09 21:00 Joey Oravec [this message]
2012-04-09 21:12 ` [U-Boot] ld fails with .bss / .rel.dyn overlap for 2011.12 Wolfgang Denk
2012-04-09 21:49   ` Joey Oravec
2012-04-10  8:02     ` Wolfgang Denk
2012-04-10  9:00       ` Dirk Behme

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=4F834E09.3010600@drewtech.com \
    --to=joravec@drewtech.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox