hi,

I figured out the problem. The Diab compiler adds an underscore in front of all the symbol. I could partially resolve the problem by calling _FUNCTION_NAME from my application.

However, now I have another problem.
The code compiled with Diab uses some functions from C-Lib.
These calls now require _memcpy() and _memset() functions to be available.
However the ulibC available on my target will only provide memcpy() and memset() functions.

One possible way to resolve this issue could be to write my own _memcpy() and _memset() [just a wrapper around memcpy and memset]. But I guess this is the most ugly way as the function calls involve unnecessary loops, and for if the code has too many external dependencies, I will have to keep on writing new wrappers.

Can some guide me on:

(1) How I can force the Diab compiler not to add an extra underscore in fron of symbol names? (2) If a is not possible, can I modify the symbol names in the library file to strip off the extra underscore? Will it break anything?

Regards,
Kunal

every thing become loop in loop -
[EMAIL PROTECTED] wrote:
Original Message:
-----------------
From: [EMAIL PROTECTED] [EMAIL PROTECTED]
Date: Thu, 20 Mar 2008 04:38:20 -0400
To: [email protected], [EMAIL PROTECTED]
Subject: Diab Objects with m68k-uclinux-gcc


Hi,

   Platform: Coldfire

   I have created a static library using Diab tool chain. When I try to
link an application against this library (which is created under Diab) with
m68k-uclinux-gcc, link fails. I get error messages "Unresolved Reference to
FUNCTION_NAME".
   All the functions with FUNCTION_NAME are defined. I can see them if I
grep for it in the library file. Problem persists if I create the library
using m68k-uclinux-ar (however the objects files which goes in the library
are still generated with diab-cc).
   If I build the object files and library using m68k-uclinux-toochain, the
problem is resolved.

    I want to know the following:
    Is it possible to use the libraries/objects which were created under
Diab Environment, with m68k-uclinux-tool-chain. If yes, HOW?

Thanks and Regards,
Kunal Singh
kunal __at__ singhkunalDOTcom

--------------------------------------------------------------------
mail2web LIVE – Free email based on Microsoft® Exchange technology -
http://link.mail2web.com/LIVE




--------------------------------------------------------------------
mail2web.com – Enhanced email for the mobile individual based on Microsoft®
Exchange - http://link.mail2web.com/Personal/EnhancedEmail





_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to