From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] uClibc missing symbols (undefined reference to `__fini_array_end')
Date: Thu, 1 Mar 2012 00:27:33 +0000 [thread overview]
Message-ID: <201203010027.33790.arnout@mind.be> (raw)
In-Reply-To: <CAGDZK6Ho6M+p4gpxHTqz8F7Jnwzo3b4KSWavh4DJ_XSb5Dp5fw@mail.gmail.com>
On Wednesday 29 February 2012 13:34:38 ?ric ALBER wrote:
> I'm using buildroot on an ARM9 (Marvel Kirkwood). I have configured
> buildroot to generate gcc on the target. But if I want to use it (gcc on
> the target), I get linker errors when I try to link a shared library like
> libpython2.7.so
> I guess I have something wrong with my uClibc or gcc setup but I can't
> figure out what. I use buildroot 2012.02-rc3, uClibc 0.9.32.1, linux 3.2.6
>
> # gcc -shared -lpython2.7 -o test.so test.o
> /usr/lib/gcc/arm-unknown-linux-uclibcgnueabi/4.6.2/../../../libc.a(__uClibc_main.os):
> In function `__uClibc_fini':
> __uClibc_main.c:(.text+0x140): undefined reference to `__fini_array_end'
> __uClibc_main.c:(.text+0x144): undefined reference to `__fini_array_start'
These symbols are defined by the linker script, to allow the source code
to find the addresses of the static constructors/destructors. So it's
not surprising that these symbols are undefined when linking a shared
library, because then you're not using a linker script.
What _is_ surprising is that it's trying to link against libc.a. Since
you're building a shared library, I'd expect it to link against libc.so...
So can you run gcc with the -v option to see how the linker is called?
And with -Wl,-M to make the linker print the libraries it loads.
You do get
/usr/lib/gcc/arm-unknown-linux-uclibcgnueabi/4.6.2/../../../libc.so
on your target, right? It's copied in by target-finalize.
(I'm trying to reproduce your build but it takes a while. And anyway
I can't run it, unless I set up a qemu for it...)
Regards,
Arnout
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286540
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
next prev parent reply other threads:[~2012-03-01 0:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-29 13:34 [Buildroot] uClibc missing symbols (undefined reference to `__fini_array_end') Éric ALBER
2012-03-01 0:27 ` Arnout Vandecappelle [this message]
2012-03-01 0:30 ` Arnout Vandecappelle
2012-03-01 0:50 ` [Buildroot] [PATCH] target-finalize: Also copy .so files if BR2_HAVE_DEVFILES is enabled Arnout Vandecappelle
2012-03-01 7:48 ` Thomas Petazzoni
2012-03-02 21:50 ` Arnout Vandecappelle
2012-03-01 11:12 ` [Buildroot] uClibc missing symbols (undefined reference to `__fini_array_end') Éric ALBER
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=201203010027.33790.arnout@mind.be \
--to=arnout@mind.be \
--cc=buildroot@busybox.net \
/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