Hello
I do not have a lot of experience with StarCore V2.5.2 tools, but hopefully my experience with V2.6 can help a little bit.
Actually with V2.6 and V2.7 tools, the options
Uninit_And_Zeroed_Globals_In_Bss=TRUE
Uninit_Globals_In_Bss=TRUE
Are used in an application configuration file not in an ICODE option file.
Can you try to create an application configuration file containing the following text:
configuration
view test
Uninit_And_Zeroed_Globals_In_Bss=TRUE
Uninit_Globals_In_Bss=TRUE
end view
end configuration
And add following options to your command line -ma "myconf.appli" -view test where myconf.appli is the name of your configuration file.
I hope this helps
CrasyCat
Table 5.6 lists public Icode options, which you can use in your application configuration files. (You also can set these options in Icode option files.)
Hello
Sorry I did not check my answer carefully enough last time .
In fact the application configuration file should look like:
configuration
view test
Uninit_And_Zeroed_Globals_To_Bss = TRUE
Uninit_Globals_To_Bss=TRUE
end view
end configuration
I have tested that on V2.6 & V2.7 and it works perfectly.
Sorry for the confusion last week.
Crasycat
Hello
This is a legacy behavior. It has been implemented that way at first.
We are thinking about activating that per default in a future release of the compiler.
Basically some customer wants to separate initialized and uninitialized data some other do not want.
But I agree with you the ELF file format usually purpose to keep them separate.
Around release notes, the option name have been adjusted in V2.7.
CrasyCat
Hello
Did you try the linker option -allow-multipledefinition?
According to the manual "SC100 linker reference.pdf",
option -allow-multipledefinition specifies using the first of multiple definitions for a symbol, although the linker generates a warning. (Without this option, multiple definitions are a fatal error).
I did not try it myself so far, but it could be worth a try :smileyhappy:
I have to check around supporting STB_WEAK in the future.
crosscut
Hello
I have made a small test, where I have re-implemented strcpy string function some other way.
Without option -Xlnk "-allow-multiple-definition", I cannot link my application due to redefinition of strcpy.
As soon as I add this option I am able to link. So this should work out.
I am not seeing and warning messages (even when I check the box "Display all errors and warnings" in the Enterprise Linker panel.
Am I missing something here?
CrasyCat