From: Mike Frysinger <vapier@gentoo.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] sparc and .udiv/.rem/.urem/.umul/etc... link errors
Date: Thu, 13 Oct 2011 11:44:53 -0400 [thread overview]
Message-ID: <201110131144.53907.vapier@gentoo.org> (raw)
In-Reply-To: <4E96A527.9090806@gaisler.com>
On Thursday 13 October 2011 04:45:27 Daniel Hellstrom wrote:
> On 10/13/2011 07:33 AM, Mike Frysinger wrote:
> > it seems that these symbols are usually implemented in the C library on
> > sparc systems, but under u-boot, we don't have that luxury. Linux
> > itself simply imports the relevant asm files from glibc into their lib
> > subdir. without these, building u-boot for sparc targets with sparc
> > linux compilers fail. any desire to make this work ? or just continue
> > to force everyone to install a dedicated sparc-elf compiler ?
>
> The .udiv/.rem ... functions are implemented by libgcc
that is target dependent
> Sparc-linux toolchains will generate ELF binaries for Linux, that is not
> what we want?
the file format is fine, but the supplementary libgcc for sparc-linux targets
does not include these symbols. it relies on the C library to provide them.
glibc sparc system:
$ readelf -s /lib/libc.so.6 | grep '[.]u'
1231: 000f41e0 20 FUNC GLOBAL DEFAULT 10 .urem@@GLIBC_2.0
1369: 000f41a0 12 FUNC GLOBAL DEFAULT 10 .udiv@@GLIBC_2.0
1557: 000f4160 20 FUNC GLOBAL DEFAULT 10 .umul@@GLIBC_2.0
and if you look at gcc's source tree in gcc/config/sparc/t-*, you'll see that
these libgcc routines are included for elf and leon targets, but not linux.
so whenever i build u-boot using a sparc-linux-gnu cross-compiler, it fails to
link due to missing these symbols. if i use sparc-elf, it links fine.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20111013/471b387d/attachment.pgp
next prev parent reply other threads:[~2011-10-13 15:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-13 5:33 [U-Boot] sparc and .udiv/.rem/.urem/.umul/etc... link errors Mike Frysinger
2011-10-13 8:45 ` Daniel Hellstrom
2011-10-13 15:44 ` Mike Frysinger [this message]
2011-10-19 9:05 ` Daniel Hellstrom
2011-10-19 14:20 ` Mike Frysinger
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=201110131144.53907.vapier@gentoo.org \
--to=vapier@gentoo.org \
--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