Sorry, i have to correct the above.
The -Ou/-Onu option does do something enterly different.
Not what the original question was about.
Hello
There is only one way to disable dead striping by the linker and this is by adding the symbol name in the PRM file ENTRIES block.
This is the only way around that.
CrasyCat
Hi guys.
Do you know if is there a generic way to disable such "cw optimization" wich simply "disappear" with not used objects?
Many times they are not accessed directly, but through different ways..there is..they are needed..!
Use ENTRY in prm file works fine, but you need to remember to write into it for every not used object you add .....
Thanks !!
Ricardo Raupp
Project settings -> Target -> Compiler for .. -> Options -> Optimize dead assignments -> never.
Or :
#pragma OPTION ADD "-Onu"
Might do the job.
Thanks MrBean
I´ve heard something about disable dead spreading could interfere in the linked lib size, since the unused functions would be compiled as well...
Do you know if it make sense?
Thanks
Ricardo Raupp
I just tried it, and it doesnt seem to cause a code size increase.
You can also temporarily have the option on:
#pragma OPTION ADD "-Onu"
//code here
#pragma OPTION DEL "-Onu" //Back to default
#pragma OPTION ADD "-Ou" //And switch on if needed.
Message Edited by jhall on 2006-10-0607:44 AM