Question about static or dynamic linking of userspace app
Fabio Giovagnini
fabio.giovagnini at aurion-tech.com
Wed Feb 9 16:13:37 UTC 2011
On Wednesday 09 February 2011 11:03:53 Andrew Stubbs wrote:
> On 09/02/11 08:31, Fabio Giovagnini wrote:
> > Two questions:
> > 1) is this the last release of the toolchian for uclinux with FDPIC
> > support?
>
> There is a new, updated toolchain here:
>
> http://www.codesourcery.com/sgpp/lite/superh
Thanks I'm upgrading
>
> > 2) Now I have 4 MiB of jffs2 filesystem. The libuClibc-0.9.30-svn.so is
> > 51,1 MB (53583624 byte). I understand it is not possible to have dynamic
> > linking in this conditions. It it true?
>
> I'm not sure I fully understand the question. Are you saying that you
> can't have dynamic libraries because they are too large for your
> file-system? If so, then you may well be right, but there is still hope!
You understood properly.
>
> In addition to the usual things like stripping the binaries or using a
> compressed file system, you might be able to use the "mklibs" Library
> Reduction Utility to reduce the binary size.
With strip --debug reduce a lot the size.
sh-uclinux-strip --strip-debug
is the only opstion or I can reduce more and more with other options?
>
> CodeSourcery does not bundle this tool into the Lite editions, but it
> does feature in the full products (there isn't one for FDPIC, but the
> regular Linux version might work with some tweaking - I believe it just
> needs to be pointed at the correct linker/objdump tools), and of course
> you can get it from the upstream repository.
I'm not sure to understand.
mkliubs is available with sh-uclinux lite or not?
If yes where can I download it and study hiow to use it?
>
> This tool removes everything from the dynamic libraries that are not
> used by the set of binaries you specify. This means that the code
> remains shared, and so reduces both run-time memory usage, and
> file-system storage space. The down-side is that you can't run arbitrary
> binaries on your system - you have to be sure they don't have additional
> symbol dependencies.
>
> Hope that helps
Sure!!!! A lot.
>
> Andrew
--
Ing. Fabio Giovagnini
Aurion s.r.l.
P.I e C.F.
00885711200
skype: aurion.giovagnini
Tel. +39.051.594.78.24
Fax. +39.051.082.14.49
Cell. +39.335.83.50.919
www.aurion-tech.com
More information about the superh-gnu-discuss
mailing list