<?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>topic %ILINK-E-NOT22BITS error (not resolved with /NATIVE) in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/ilink-e-not22bits-error-not-resolved-with-native/m-p/4468752#M17082</link>
    <description>Hi Folks,&lt;BR /&gt;&lt;BR /&gt;I have a project originally written, compiled and linked on Alpha. I am trying to port it to Itanium and faced the subject error while linking some modules.&lt;BR /&gt;&lt;BR /&gt;%ILINK-E-NOT22BITS, the short data segment has exceeded 4 MB&lt;BR /&gt;%ILINK-E-NOIMGFIL, image file not created&lt;BR /&gt;&lt;BR /&gt;I found a branch here with discussion (&lt;A href="http://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=605424)" target="_blank"&gt;http://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=605424)&lt;/A&gt; which addresses exactly the same issue and it has some kind of workaround – to use /NATIVE option for linker. I redefined ‘link’ command in the following way:&lt;BR /&gt;&lt;BR /&gt;link :== link/NATIVE&lt;BR /&gt;&lt;BR /&gt;and rebuilt the whole project from scratch. In fact it didn’t help and the issue still occurs for the same images. These images are built from ~1500 modules. BTW, I have noticed that average image size on Alpha is about 100Mb. Those images which were linked successfully on Itanium are twice this size (&amp;gt;200Mb).&lt;BR /&gt;&lt;BR /&gt;Some info on my system is below:&lt;BR /&gt;1) Linker version is the following:&lt;BR /&gt;$ cc /version&lt;BR /&gt;HP C V7.2-001 on OpenVMS IA64 V8.3-1H1&lt;BR /&gt;&lt;BR /&gt;2) String for compiler (legacy of Alpha code):&lt;BR /&gt;$ show sym ccc&lt;BR /&gt;  CCC == "CC/G_FLOAT/STAND=VAXC/DEF=VAX/NOMEMBER_AL/NOOPT"&lt;BR /&gt;&lt;BR /&gt;Any input is much appreciated.&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Dmitry Sinelnikov</description>
    <pubDate>Wed, 29 Jul 2009 05:31:16 GMT</pubDate>
    <dc:creator>Dmitry V. Sinelnikov</dc:creator>
    <dc:date>2009-07-29T05:31:16Z</dc:date>
    <item>
      <title>%ILINK-E-NOT22BITS error (not resolved with /NATIVE)</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/ilink-e-not22bits-error-not-resolved-with-native/m-p/4468752#M17082</link>
      <description>Hi Folks,&lt;BR /&gt;&lt;BR /&gt;I have a project originally written, compiled and linked on Alpha. I am trying to port it to Itanium and faced the subject error while linking some modules.&lt;BR /&gt;&lt;BR /&gt;%ILINK-E-NOT22BITS, the short data segment has exceeded 4 MB&lt;BR /&gt;%ILINK-E-NOIMGFIL, image file not created&lt;BR /&gt;&lt;BR /&gt;I found a branch here with discussion (&lt;A href="http://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=605424)" target="_blank"&gt;http://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=605424)&lt;/A&gt; which addresses exactly the same issue and it has some kind of workaround – to use /NATIVE option for linker. I redefined ‘link’ command in the following way:&lt;BR /&gt;&lt;BR /&gt;link :== link/NATIVE&lt;BR /&gt;&lt;BR /&gt;and rebuilt the whole project from scratch. In fact it didn’t help and the issue still occurs for the same images. These images are built from ~1500 modules. BTW, I have noticed that average image size on Alpha is about 100Mb. Those images which were linked successfully on Itanium are twice this size (&amp;gt;200Mb).&lt;BR /&gt;&lt;BR /&gt;Some info on my system is below:&lt;BR /&gt;1) Linker version is the following:&lt;BR /&gt;$ cc /version&lt;BR /&gt;HP C V7.2-001 on OpenVMS IA64 V8.3-1H1&lt;BR /&gt;&lt;BR /&gt;2) String for compiler (legacy of Alpha code):&lt;BR /&gt;$ show sym ccc&lt;BR /&gt;  CCC == "CC/G_FLOAT/STAND=VAXC/DEF=VAX/NOMEMBER_AL/NOOPT"&lt;BR /&gt;&lt;BR /&gt;Any input is much appreciated.&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Dmitry Sinelnikov</description>
      <pubDate>Wed, 29 Jul 2009 05:31:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/ilink-e-not22bits-error-not-resolved-with-native/m-p/4468752#M17082</guid>
      <dc:creator>Dmitry V. Sinelnikov</dc:creator>
      <dc:date>2009-07-29T05:31:16Z</dc:date>
    </item>
    <item>
      <title>Re: %ILINK-E-NOT22BITS error (not resolved with /NATIVE)</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/ilink-e-not22bits-error-not-resolved-with-native/m-p/4468753#M17083</link>
      <description>You very likely can't do much to get this image linked as it is. You should contact HP. You probably need help to determine the underlying problem and to resolve it.&lt;BR /&gt;&lt;BR /&gt;The linker is only the messenger, the problem is too much data to be collected or created to fit in a 4MB virtual address space.&lt;BR /&gt;&lt;BR /&gt;Collected are short data sections created by the compilers. Short data may be a longword for an int or smaller items. The compilers decides. Relocations, produced by the compilers, require the linker to create data. Created data are address data and function descriptors. The error code indicates the linker tries to create that data and hits the 4MB limit.&lt;BR /&gt;&lt;BR /&gt;The limit of 4MB is imposed by the set of IA64 instructions, which the compiler used to  create code.&lt;BR /&gt;&lt;BR /&gt;That said, when linking, you can&lt;BR /&gt;- for shareable images, move the symbol vector out of short data:/SEGMENT=SYMBOL_VECTOR=NOSHORT&lt;BR /&gt;- for a test, combine readonly and writeable short data: /SEGEMENT=SHORT=WRITE&lt;BR /&gt;&lt;BR /&gt;The other option is to check how much short data sections the compiler generated and, if it is much, to try to reduce that.&lt;BR /&gt;&lt;BR /&gt;That may require a simple re-compile with a different external data model or may require code changes to move some of the short data into bigger ones. Unfortunately there is no compiler switch to tell what or how much the compiler should put into short data sections.&lt;BR /&gt;&lt;BR /&gt;And, there is no easy way to estimate how much short data will be used based on what you have on Alpha. (The size of the image and that it is twice the size of Alpha doesn't mean anything for short data.)&lt;BR /&gt;</description>
      <pubDate>Wed, 29 Jul 2009 07:41:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/ilink-e-not22bits-error-not-resolved-with-native/m-p/4468753#M17083</guid>
      <dc:creator>H.Becker</dc:creator>
      <dc:date>2009-07-29T07:41:15Z</dc:date>
    </item>
    <item>
      <title>Re: %ILINK-E-NOT22BITS error (not resolved with /NATIVE)</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/ilink-e-not22bits-error-not-resolved-with-native/m-p/4468754#M17084</link>
      <description>One more thing, try to avoid multiple code segments. That is, no CLUSTER= optios, try to use the default linker cluster with all your code and data.</description>
      <pubDate>Wed, 29 Jul 2009 08:11:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/ilink-e-not22bits-error-not-resolved-with-native/m-p/4468754#M17084</guid>
      <dc:creator>H.Becker</dc:creator>
      <dc:date>2009-07-29T08:11:39Z</dc:date>
    </item>
    <item>
      <title>Re: %ILINK-E-NOT22BITS error (not resolved with /NATIVE)</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/ilink-e-not22bits-error-not-resolved-with-native/m-p/4468755#M17085</link>
      <description>Thank you.&lt;BR /&gt;Switching to&lt;BR /&gt;&lt;BR /&gt;link:==link/segment=short=write&lt;BR /&gt;&lt;BR /&gt;changed error description. Now it has another 'relocation section', 'relocation type', 'relocation entry' and 'module' eventually. But in fact the issue still persists.&lt;BR /&gt;&lt;BR /&gt;Talked to the code-author, he said he had the same issue with Itanium platform long time ago and it was 'cured' by splitting images into several parts. Will put the details here once he gives me some more info but it seems you are write and I have to change either linking procedure or the code structure itself.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 29 Jul 2009 17:33:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/ilink-e-not22bits-error-not-resolved-with-native/m-p/4468755#M17085</guid>
      <dc:creator>Dmitry V. Sinelnikov</dc:creator>
      <dc:date>2009-07-29T17:33:59Z</dc:date>
    </item>
    <item>
      <title>Re: %ILINK-E-NOT22BITS error (not resolved with /NATIVE)</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/ilink-e-not22bits-error-not-resolved-with-native/m-p/4468756#M17086</link>
      <description>You didn't hear this from me :), but try /SWITCH=REDUCE_RELOCATIONS on the C command.  That is an undocumented qualifier to tell the code generator that instead of asking the linker to produce addresses for things like "psect+10", it will only ask for the base address of "psect" and do the "+10" at run-time.  We added this for large COBOL applications (REDUCE_RELOCATIONS is enabled by default for COBOL and it is a documented option for Pascal).</description>
      <pubDate>Thu, 30 Jul 2009 16:49:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/ilink-e-not22bits-error-not-resolved-with-native/m-p/4468756#M17086</guid>
      <dc:creator>John Reagan</dc:creator>
      <dc:date>2009-07-30T16:49:08Z</dc:date>
    </item>
    <item>
      <title>Re: %ILINK-E-NOT22BITS error (not resolved with /NATIVE)</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/ilink-e-not22bits-error-not-resolved-with-native/m-p/4468757#M17087</link>
      <description>Finally the issue has been resolved. As I already mentioned code-author had a special instruction to workaround this Itanium specific issue. For those interested here is some check points of this "how to":&lt;BR /&gt; - perl script parses source code and moves all GLOBAL variables to one file to avoid duplicating it in every module&lt;BR /&gt; - once modules are compiled into *.olb files - another script (regular openvms batch script) extracts all RDB modules from these *.olb into one separate olb library and then compiles shareable EXE modules.&lt;BR /&gt; - final step is compiling necessary servers with these shareable EXE modules. As a result instead of 10 * 150Mb servers we have ~10 * 50 Mb servers + ~20 shareable EXE modules which must be installed using "$instal replace/share" expression...&lt;BR /&gt;&lt;BR /&gt;Somewhat non-trivial after all... but it seems to be the only way to avoid huge code changes in a big project and make compilation process only slightly different from what is used on Alpha platform. &lt;BR /&gt;Hopefully it will give some hints to those who will face the same issue.</description>
      <pubDate>Fri, 28 Aug 2009 10:27:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/ilink-e-not22bits-error-not-resolved-with-native/m-p/4468757#M17087</guid>
      <dc:creator>Dmitry V. Sinelnikov</dc:creator>
      <dc:date>2009-08-28T10:27:03Z</dc:date>
    </item>
    <item>
      <title>Re: %ILINK-E-NOT22BITS error (not resolved with /NATIVE)</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/ilink-e-not22bits-error-not-resolved-with-native/m-p/4468758#M17088</link>
      <description>Dmitry, Thank you for a clear and complete follow up!&lt;BR /&gt;And Hartmut and John, thanks for the detailed background as as always.&lt;BR /&gt;This has become one of the better topics ever.&lt;BR /&gt;Gem's like this make it worthwhile to spend some time here.&lt;BR /&gt;Regards,&lt;BR /&gt;Hein.&lt;BR /&gt;</description>
      <pubDate>Fri, 28 Aug 2009 10:47:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/ilink-e-not22bits-error-not-resolved-with-native/m-p/4468758#M17088</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2009-08-28T10:47:42Z</dc:date>
    </item>
    <item>
      <title>Re: %ILINK-E-NOT22BITS error (not resolved with /NATIVE)</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/ilink-e-not22bits-error-not-resolved-with-native/m-p/4468759#M17089</link>
      <description>IIRC, this was mentioned on a bootcamp as well: if you have a big (monolithic) program, split it up into shared images, just to prevent this issue.</description>
      <pubDate>Tue, 01 Sep 2009 08:22:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/ilink-e-not22bits-error-not-resolved-with-native/m-p/4468759#M17089</guid>
      <dc:creator>Willem Grooters</dc:creator>
      <dc:date>2009-09-01T08:22:38Z</dc:date>
    </item>
  </channel>
</rss>

