DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2010-03-27 11:13:38

interphase
New member
From: DE
Registered: 2010-03-21
Posts: 1

Cross toolchain link problems (1.6)

Hey guys,

just got my DNS-323, successfully put ffp on it etc.
now I've got as per wiki instructions (with little corrections) a (functional?) toolchain.

I can build hello world just fine and also execute it on the DNS.
The problem is, somehow gcc generates (no matter the command line args) statically linked executables/libraries.

To test my toolchain, I've tried to build lighttpd earlier (just as a test, I know there is package already).
It built fine. But:

Code:

$ file src/lighttpd
src/lighttpd: ELF 32-bit LSB executable, ARM, version 1, statically linked, not stripped

If I try to exec it on the DNS, I get

Code:

root@nas:/mnt/HD_a2/ffp# sbin/lighttpd -m lib -f etc/lighttpd.conf
: can't resolve symbol '__deregister_frame_info'

I tried various combinations of -fPIC -shared -Os -mtune as args to gcc, but they had no effect. Still statically linked.

In the gcc-3.3.x dir I looked at the default configuration of uClibc. It clearly says it has shared library support.

Now, how can I tell gcc/ld to link dynamically?
Or, how can cross-compile programs which use external libs in such a way, that they run on the DNS?

Thanks smile

- interphase

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB