<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Classic/Legacy CodeWarrior中的主题 Re: Compiler won't create .bss section</title>
    <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Compiler-won-t-create-bss-section/m-p/137930#M1069</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;Sorry I did not check my answer carefully enough last time &lt;IMG alt=":smileysurprised:" class="emoticon emoticon-smileysurprised" id="smileysurprised" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-surprised.gif" title="Smiley Surprised" /&gt;.&lt;/P&gt;&lt;P&gt;In fact the application configuration file should look like:&lt;/P&gt;&lt;P&gt;configuration&lt;BR /&gt;&amp;nbsp; view test&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Uninit_And_Zeroed_Globals_To_Bss = TRUE&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Uninit_Globals_To_Bss=TRUE&lt;/P&gt;&lt;P&gt;&amp;nbsp; end view&lt;BR /&gt;end configuration&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I have tested that on V2.6 &amp;amp; V2.7 and it works perfectly.&lt;/P&gt;&lt;P&gt;Sorry for the confusion last week.&lt;/P&gt;&lt;P&gt;Crasycat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Jun 2006 17:54:22 GMT</pubDate>
    <dc:creator>CrasyCat</dc:creator>
    <dc:date>2006-06-06T17:54:22Z</dc:date>
    <item>
      <title>Compiler won't create .bss section</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Compiler-won-t-create-bss-section/m-p/137927#M1066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I'm Using CodeWarrior for StarCore v2.7.2.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I can't get the compiler to create a .bss section.&amp;nbsp; When I declare an uninitialized variable, say&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp; unsigned int blah[50];&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;it gets placed in the .data section, initialized to zero.&amp;nbsp; I don't like this, because it increases the size of my .eld file needlessly.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I have tried using an Icode options file containing the following:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp; Uninit_And_Zeroed_Globals_In_Bss=TRUE&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Uninit_Globals_In_Bss=TRUE&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;This seems to have no effect.&amp;nbsp; Could this be being overridden somewhere?&amp;nbsp; Any other ideas?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks,&lt;/DIV&gt;&lt;DIV&gt;Jonathan Jones&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jun 2006 08:01:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Compiler-won-t-create-bss-section/m-p/137927#M1066</guid>
      <dc:creator>JonathanJones</dc:creator>
      <dc:date>2006-06-02T08:01:35Z</dc:date>
    </item>
    <item>
      <title>Re: Compiler won't create .bss section</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Compiler-won-t-create-bss-section/m-p/137928#M1067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;FONT size="2"&gt;Hello&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;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.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Actually with V2.6 and V2.7 tools, the options&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&amp;nbsp; Uninit_And_Zeroed_Globals_In_Bss=TRUE&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Uninit_Globals_In_Bss=TRUE&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Are used in an application configuration file not in an ICODE option file.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Can you try to create an application configuration file containing the following text:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;configuration&lt;BR /&gt;&amp;nbsp; view test&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; Uninit_And_Zeroed_Globals_In_Bss=TRUE&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Uninit_Globals_In_Bss=TRUE&lt;BR /&gt;&amp;nbsp; end view&lt;BR /&gt;end configuration&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;And add following options to your command line -ma "myconf.appli" -view test where myconf.appli is the name of your configuration file.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;I hope this helps&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;CrasyCat&lt;/FONT&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jun 2006 20:05:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Compiler-won-t-create-bss-section/m-p/137928#M1067</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2006-06-02T20:05:17Z</dc:date>
    </item>
    <item>
      <title>Re: Compiler won't create .bss section</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Compiler-won-t-create-bss-section/m-p/137929#M1068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Thanks for your help.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I tried your suggestion, and it had no effect.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;In the Enterprise C Compiler Manual (v2.6 -- revised 24 Sept. 2004), the Uninit_And_Zeroed_Globals_In_Bss and Uninit_Globals_In_Bss options are listed in Table 5.6.&amp;nbsp; Regarding this table, it says:&lt;/DIV&gt;&lt;BLOCKQUOTE dir="ltr"&gt;&lt;DIV&gt;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.)&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;DIV&gt;So, now I have tried the options in both files, without effect.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I have also tried running the compiler from the DOS command line with a minimal command line, with the same result.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I am stumped.&amp;nbsp; Any other ideas?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks,&lt;/DIV&gt;&lt;DIV&gt;Jonathan Jones&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jun 2006 22:30:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Compiler-won-t-create-bss-section/m-p/137929#M1068</guid>
      <dc:creator>JonathanJones</dc:creator>
      <dc:date>2006-06-02T22:30:19Z</dc:date>
    </item>
    <item>
      <title>Re: Compiler won't create .bss section</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Compiler-won-t-create-bss-section/m-p/137930#M1069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;Sorry I did not check my answer carefully enough last time &lt;IMG alt=":smileysurprised:" class="emoticon emoticon-smileysurprised" id="smileysurprised" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-surprised.gif" title="Smiley Surprised" /&gt;.&lt;/P&gt;&lt;P&gt;In fact the application configuration file should look like:&lt;/P&gt;&lt;P&gt;configuration&lt;BR /&gt;&amp;nbsp; view test&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Uninit_And_Zeroed_Globals_To_Bss = TRUE&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Uninit_Globals_To_Bss=TRUE&lt;/P&gt;&lt;P&gt;&amp;nbsp; end view&lt;BR /&gt;end configuration&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I have tested that on V2.6 &amp;amp; V2.7 and it works perfectly.&lt;/P&gt;&lt;P&gt;Sorry for the confusion last week.&lt;/P&gt;&lt;P&gt;Crasycat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jun 2006 17:54:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Compiler-won-t-create-bss-section/m-p/137930#M1069</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2006-06-06T17:54:22Z</dc:date>
    </item>
    <item>
      <title>Re: Compiler won't create .bss section</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Compiler-won-t-create-bss-section/m-p/137931#M1070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Yep, that does the trick.&amp;nbsp; Thanks!&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Looks to be a documentation error.&amp;nbsp; It says "...In_Bss" in my copy of the compiler manual, and in some (but not all) of the Release Notes files.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I wonder why this option has to be turned on.&amp;nbsp; Why isn't it the default behavior?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jun 2006 22:42:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Compiler-won-t-create-bss-section/m-p/137931#M1070</guid>
      <dc:creator>JonathanJones</dc:creator>
      <dc:date>2006-06-06T22:42:10Z</dc:date>
    </item>
    <item>
      <title>Re: Compiler won't create .bss section</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Compiler-won-t-create-bss-section/m-p/137932#M1071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;This&amp;nbsp;is a legacy behavior.&amp;nbsp;It has been implemented that&amp;nbsp;way at first.&amp;nbsp;&lt;BR /&gt;We are thinking about activating that per default in a future release of the compiler.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically some customer wants to separate initialized and uninitialized data some other do not want.&lt;/P&gt;&lt;P&gt;But I agree with you the ELF file format usually purpose to keep them separate.&lt;/P&gt;&lt;P&gt;Around release notes, the option name have been adjusted in V2.7.&lt;/P&gt;&lt;P&gt;CrasyCat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jun 2006 18:20:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Compiler-won-t-create-bss-section/m-p/137932#M1071</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2006-06-07T18:20:39Z</dc:date>
    </item>
    <item>
      <title>Re: Compiler won't create .bss section</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Compiler-won-t-create-bss-section/m-p/137933#M1072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Interesting.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Speaking of the ELF format and future plans, is there any intention to support STB_WEAK binding in the future?&amp;nbsp; It looks like the linker currently treats these symbols as STB_GLOBAL.&amp;nbsp; I have had to write my own "pre-linker" that strips conflicting symbols out of .eln files before linking.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Ideally, what I would like to be able to do is to specify on the linker command&amp;nbsp;line (or in the .lcf file) that the global symbols in one particular .eln file should take precedence over the conflicting global symbols in all other .eln files.&amp;nbsp; An alternate solution would be a compiler option to make all (or some) global symbols "weak" when creating the .eln file.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;And of course the dead-code-stripping logic needs to be aware that if a "weak" symbol is superseded, the code it references should be stripped.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Perhaps you can think of a way to do what I need to do using the current compiler/linker.&amp;nbsp; Basically, I want to "compile against" a pre-existing .eld file.&amp;nbsp; Any functions that are present in the pre-existing .eld file should supersede the functions of the same name that appear in the .eln files I'm linking.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks for your time.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jun 2006 23:18:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Compiler-won-t-create-bss-section/m-p/137933#M1072</guid>
      <dc:creator>JonathanJones</dc:creator>
      <dc:date>2006-06-07T23:18:43Z</dc:date>
    </item>
    <item>
      <title>Re: Compiler won't create .bss section</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Compiler-won-t-create-bss-section/m-p/137934#M1073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;Did you try the linker option -allow-multipledefinition?&lt;/P&gt;&lt;P&gt;According to the manual "SC100 linker reference.pdf",&lt;BR /&gt;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).&lt;/P&gt;&lt;P&gt;I did not try it myself so far, but it could be worth a try :smileyhappy:&lt;/P&gt;&lt;P&gt;I have to check around supporting STB_WEAK in the future.&lt;/P&gt;&lt;P&gt;crosscut&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jun 2006 18:38:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Compiler-won-t-create-bss-section/m-p/137934#M1073</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2006-06-09T18:38:40Z</dc:date>
    </item>
    <item>
      <title>Re: Compiler won't create .bss section</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Compiler-won-t-create-bss-section/m-p/137935#M1074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Yeah, I've played around a little with -allow-multiple-definitions.&amp;nbsp; But in my case, having the linker spit out hundreds of warning messages isn't a very good solution.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Plus, I really want to be able to specify on a per-symbol basis which one takes precedence.&amp;nbsp; I can't do this if the precedence is determined by the order of the object files on the command line.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 Jun 2006 03:30:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Compiler-won-t-create-bss-section/m-p/137935#M1074</guid>
      <dc:creator>JonathanJones</dc:creator>
      <dc:date>2006-06-11T03:30:18Z</dc:date>
    </item>
    <item>
      <title>Re: Compiler won't create .bss section</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Compiler-won-t-create-bss-section/m-p/137936#M1075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;I have made a small test, where I have re-implemented strcpy string function some other way.&lt;/P&gt;&lt;P&gt;Without option -Xlnk "-allow-multiple-definition", I cannot link my application due to redefinition of strcpy.&lt;/P&gt;&lt;P&gt;As soon as I add this option I am able to link. So this should work out.&lt;/P&gt;&lt;P&gt;I am not seeing and warning messages (even when I check the box "Display all errors and warnings" in&amp;nbsp;the Enterprise Linker panel.&lt;/P&gt;&lt;P&gt;Am I missing something here?&lt;/P&gt;&lt;P&gt;CrasyCat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jun 2006 16:31:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Compiler-won-t-create-bss-section/m-p/137936#M1075</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2006-06-12T16:31:08Z</dc:date>
    </item>
  </channel>
</rss>

