Problem with -nodead option

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Problem with -nodead option

2,639件の閲覧回数
haluong
Contributor I
Dear all,
 
I get the error when I use "-nodead" option in mwld56800e
"### mwld56800e.exe Linker Error:
#   Undefined : "F_ExitProcess"
#   Referenced from "F__exit" in MSL C 56800E.lib
### mwld56800e.exe Linker Error:
#   Undefined : "F__ieee754_log"
#   Referenced from "F__ieee754_acosh" in MSL C 56800E.lib
### mwld56800e.exe Linker Error:
#   Undefined : "Ffma"
#   Referenced from "Ffmal" in MSL C 56800E.lib
### mwld56800e.exe Linker Error:
#   Undefined : "Fstrtof"
#   Referenced from "Fnanf" in MSL C 56800E.lib
### mwld56800e.exe Linker Alert:
#   Link failed."
mwld56800e -m Finit_sim_ -g  -map -nodead -l"Runtime 56800E.Lib" -l"MSL C 56800E
.lib" "sim_sdm_linker.cmd"
It is ok when I didn't use nodead option. Could you please help me?
 
Thanks ,
haluong
ラベル(1)
タグ(1)
0 件の賞賛
3 返答(返信)

420件の閲覧回数
trytohelp
NXP Employee
NXP Employee
Hello,
 
The -[no]dead[strip]  option is used to enable/disable the dead-stripping of unused code.
By default the dead-stripping is enable. to reduce the size of code.
If you disable it and linked a library to your application, all libraries functions will be included in your application.
This is the case on your side as you're using the MSL C 56800E.lib library.
You disable the dead stripping feature and got some linker errors.
 
The problem is that the library refers to some functions which one were removed of your application with the dead stripping option.
 
You have 2 solutions:
 - implement the functions,
 - use the dead stipping option.
 
Hope this will help you.
Pascal
0 件の賞賛

420件の閲覧回数
haluong
Contributor I
Dear Pascal,
 
Thanks for your reply early. I created the "DSP56800X New Project Wizard"/simulators. And I used smm linker,  Disable  Deadstripping in linker panel setting. It has the error:

"Link Error   : Undefined : "F_ExitProcess"
Referenced from "F__exit" in MSL C 56800E.lib

Link Error   : Undefined : "F__ieee754_log"
Referenced from "F__ieee754_acosh" in MSL C 56800E.lib

Link Error   : Undefined : "Ffma"
Referenced from "Ffmal" in MSL C 56800E.lib

Link Error   : Undefined : "Fstrtof"
Referenced from "Fnanf" in MSL C 56800E.lib

Link failed.
"
I try to pass these undefined symbol in -force_active, it makes the application is corrupt as the attached file.  
Thanks
haluong


Message Edited by haluong on 2008-01-15 02:59 AM
0 件の賞賛

420件の閲覧回数
trytohelp
NXP Employee
NXP Employee
Hi,
 
Force active must be used to say to the linker to keep a module.
If you use the deadstripping option you don't need Force active.
Force Active:
 Directs the linker to include symbols in the link, even if those symbols are not referenced.
 Makes symbols immune to deadstripping.
 
To fix the linker error you must define the functions.
For instance:
"Link Error   : Undefined : "F_ExitProcess"
Referenced from "F__exit" in MSL C 56800E.lib
In the abort_exit.h this function is called:
   _MSL_IMP_EXP_C void _MSL_CDECL _ExitProcess(void) _MSL_CANT_THROW;         
To fix this error you must define this function:
 void  _ExitProcess(void)
 {
   asm (nop); 
 }
This is the same for other errors.
See an example attached with all linker errors fixed.
 
Pascal
0 件の賞賛