This is the mail archive of the crossgcc@sources.redhat.com 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]

Re: Strange dynamic linking error...


Alexandros Karypidis wrote:
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 execution:

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

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?

I wonder -- is stat() being mangled? Did you #include <sys/stat.h> as required by http://www.opengroup.org/onlinepubs/007904975/functions/stat.html ? What does nm (or readelf) say about the reference to stat in your program? - Dan

--
Dan Kegel
http://www.kegel.com
http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=78045


------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


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