Sign in

username:

password:



Not a member?

Search code-comp



Search tips

Subscribe to code-comp



code-comp by Keywords

ARM7 | BIOS | Bug | EVM | JTAG | Linker | LOG_printf | McBSP | Profiling | Relocation | RTDX | Simulator | Target | Watch

Discussion Groups

Discussion Groups | Code-Composer | Did you ever work with minit()?

Technical discussions about Code Composer Studio.

  

Post a new Thread

Did you ever work with minit()? - ahma...@yahoo.com - Apr 3 15:35:02 2008



hi
When I used minit() function in my code the following error message appeared at link time:
error: absolute symbol _malloc in C:\CCStudio_v3.1\C5400\cgtools\lib\rts_EXT.lib is defined
multiple times

this error repeated 2 times more for _calloc,_realloc,
Would you know why?
Regards

------------------------------------

Check Out Industry's First Single-Chip, Multi-Format, Real-Time HD Video Transcoding Solution
for Commercial & Consumer End Equipment: www.ti.com/dm6467



(You need to be a member of code-comp -- send a blank email to code-comp-subscribe@yahoogroups.com )

Re: Did you ever work with minit()? - Jeff Brower - Apr 4 13:27:13 2008

Ahmad-

> When I used minit() function in my code the following error message
> appeared at link time:
> error: absolute symbol _malloc in C:\CCStudio_v3.1\C5400\cgtools\lib\rts_EXT.lib is
defined multiple times
> 
> this error repeated 2 times more for _calloc,_realloc,
> Would you know why?

My guess is that rts_ext.lib is listed in the project more than once.  You might
check the DSP/BIOS .cmd file, user-defined .cmd file, and 'Libraries' field in the
project Build Options (under Linker tab) to see if there is any duplication.

-Jeff

------------------------------------

Check Out Industry's First Single-Chip, Multi-Format, Real-Time HD Video Transcoding Solution
for Commercial & Consumer End Equipment: www.ti.com/dm6467



(You need to be a member of code-comp -- send a blank email to code-comp-subscribe@yahoogroups.com )

Re: Did you ever work with minit()? - Andrew Nesterov - Apr 5 10:17:05 2008

> Subject: Re: Did you ever work with minit()?
> Posted by: "Jeff Brower" j...@signalogic.com
> Date: Fri Apr 4, 2008 10:27 am ((PDT))
>
> Ahmad-
>
> > When I used minit() function in my code the following error message
> > appeared at link time:
> > error: absolute symbol _malloc in 
> > C:\CCStudio_v3.1\C5400\cgtools\lib\rts_EXT.lib is defined multiple times
> >
> > this error repeated 2 times more for _calloc,_realloc,
> > Would you know why?
>
> My guess is that rts_ext.lib is listed in the project more than once.  You might
> check the DSP/BIOS .cmd file, user-defined .cmd file, and 'Libraries' field in the
> project Build Options (under Linker tab) to see if there is any duplication.

A function in a library is linked in just one time, either from the last 
library with that external symbol from the list of the libraries, or if 
-priority option was specified, this external symbol is linked in from the 
first library that contains it.

Multiple definition occurs when the same symbol is defined in multiple object 
modules that all specified to be linked in into the same executable.

Apparently, there are corresponding definitions of RTS's memory handling 
functions in the application's .obj's files.

There's a companion question to which I do not know an answer as yet: what 
would happen if a file scope global _variable_ was defined in several files
and these files are archived each into a separate library and these libraries
are in the list of the libraries to be searched by the linker to link an
application. For example:

src1.c contains global int var1
src2.c contains global int var1
etc.,
src1.obj is archived into lib1.lib
src2.obj is archived into lib1.lib
etc.,
and the linker is invoked with an option -l lib1 -l lib2 etc..

Will try to experiment with this.

Rgds,

Andrew

------------------------------------

Check Out Industry's First Single-Chip, Multi-Format, Real-Time HD Video Transcoding Solution
for Commercial & Consumer End Equipment: www.ti.com/dm6467



(You need to be a member of code-comp -- send a blank email to code-comp-subscribe@yahoogroups.com )