This is the mail archive of the mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Strange dynamic linking error...

I cross-compiled my C++ application on my x86 desktop for my ARM iPaq. The x86 
version on the desktop works fine. On the iPaq i get at some point during 

/path/to/myProgBin: relocation error: /path/to/myProgBin: undefined symbol: 

Now, stat() is probably in the standard libs somewhere. For the x86 version 
working on my desktop I have:

> ldd .libs/lt-myProgBin => /lib/ (0x40059000) => /usr/lib/ (0x40549000) => /lib/ (0x40602000) => /lib/ (0x40624000) => /lib/ (0x4062c000)
        /lib/ => /lib/ (0x40000000) => /lib/ (0x4075f000) => /lib/ (0x40763000) => /usr/lib/ (0x40794000) => /lib/ (0x407c0000) => /usr/lib/ (0x407cf000)

On the ipaq I get:

~ # ldd /opt/2wear/bin/arm-linux-storageServiceGL2CAP => /lib/ (0x4002b000) => /usr/lib/ 
(0x40560000) => /lib/ (0x405aa000) => /lib/ (0x40623000)
        /lib/ => /lib/ (0x40000000) => /usr/lib/ (0x4074a000) => /usr/lib/ (0x4076e000) => /usr/lib/ (0x407a6000) => /lib/ (0x407bb000) => /lib/ (0x407c6000) => /lib/ (0x407fa000)

I am suspecting libc. On my desktop, the cross-compiler searches for libs in:

karypid@grads-d5-pc-2:/usr/local/arm/2.95.4> arm-linux-g++ -print-search-dirs
install: /usr/local/arm/2.95.4/lib/gcc-lib/arm-linux/2.95.4/
libraries: /usr/local/arm/2.95.4/arm-linux/lib/

And in /usr/local/arm/2.95.4/arm-linux/lib/ I see this difference with the 

ipaq: /lib/ ->

The susprising part is that if I cross-compile the subset of the program which 
uses stat() using the C compiler (gcc and NOT g++), the call to stat() is 
resolved successfully! Why is this?

In theory, there is no difference between theory and practice,
in practice there is. -- Yogi Berra.

Alexandros Karypidis
University of Thessaly
Computer & Communications Engineering dept.

Want more information?  See the CrossGCC FAQ,
Want to unsubscribe? Send a note to

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]