<?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 I have had success on Linux in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Hiding-symbols-in-dynamic-symbol-table-Linux-so/m-p/1169744#M145513</link>
    <description>&lt;P&gt;I have had success on Linux using the option: --version-script=makeexportlist.txt&lt;/P&gt;&lt;P&gt;Where my "makeexportlist.txt" file lists the subroutine names that I want to export (such as "mySub1" and "mySub2")&amp;nbsp;and hides the rest of the subroutine names.&amp;nbsp; That file has the format:&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;&amp;nbsp; global: mySub1; mySub2;&lt;BR /&gt;&amp;nbsp; local: *;&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;References that were useful for&amp;nbsp;me:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.gnu.org/software/gnulib/manual/html_node/LD-Version-Scripts.html" target="_blank"&gt;https://www.gnu.org/software/gnulib/manual/html_node/LD-Version-Scripts.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.gnu.org/software/gnulib/manual/html_node/Exported-Symbols-of-Shared-Libraries.html" target="_blank"&gt;https://www.gnu.org/software/gnulib/manual/html_node/Exported-Symbols-of-Shared-Libraries.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Is this information what you're looking for?&lt;/P&gt;&lt;P&gt;Regards, Greg&lt;/P&gt;</description>
    <pubDate>Fri, 27 Sep 2019 21:11:15 GMT</pubDate>
    <dc:creator>Greg_T_</dc:creator>
    <dc:date>2019-09-27T21:11:15Z</dc:date>
    <item>
      <title>Hiding symbols in dynamic symbol table: Linux .so</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Hiding-symbols-in-dynamic-symbol-table-Linux-so/m-p/1169741#M145510</link>
      <description>&lt;P&gt;In an old post, I asked whether it was possible to get the functionality of iFort Windows DLLEXPORT&amp;nbsp; in Linux, where DLLEXPORT exposes only functions that are needed by an external caller. One reply suggested the Linux STRIP command, which removes static symbols. However, after using this command,&amp;nbsp;I still see thousands of&amp;nbsp;symbols in the "Dynamic symbol" and "relocation" tables in the .so file, and I would prefer that almost all of these remain private.&lt;/P&gt;&lt;P&gt;&lt;A href="https://akkadia.org/drepper/dsohowto.pdf" target="_blank"&gt;https://akkadia.org/drepper/dsohowto.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;page 22, section 2.5.5 proposes solving this by using Export Maps at the link stage, and shows the syntax for applying such a map file at the link stage when building a project using gcc. I have two questions:&lt;/P&gt;&lt;P&gt;(1) Is it possible to adapt this method to Intel Fortran for Linux, and if so, what is the syntax?&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the example, they use a linker option --version-script and show a build command line example&lt;/P&gt;&lt;P&gt;$ gcc -shared -o -foo.so foo.c -fPIC \ W1, --version-script=foo.map&lt;/P&gt;&lt;P&gt;(2) What damage can I do by removing what seem to be private symbols from the dynamic symbol table and the relocation tables? (That is, removing function names that will not be called by the external caller, along with the internal variables in these private functions and subroutines. Or do I have to retain all of them? Or a subset?)&lt;/P&gt;&lt;P&gt;Finally, I have to remark that if the Intel team implemented the equivalent of DLLEXPORT in the Linux compiler, I would certainly find it useful.&lt;/P&gt;&lt;P&gt;Thanks in advance for any insight.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2019 05:33:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Hiding-symbols-in-dynamic-symbol-table-Linux-so/m-p/1169741#M145510</guid>
      <dc:creator>rorban</dc:creator>
      <dc:date>2019-09-27T05:33:41Z</dc:date>
    </item>
    <item>
      <title>The compiler can't do</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Hiding-symbols-in-dynamic-symbol-table-Linux-so/m-p/1169742#M145511</link>
      <description>&lt;P&gt;The compiler can't do anything about this - it's simply the way shared libraries work on Linux.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2019 13:43:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Hiding-symbols-in-dynamic-symbol-table-Linux-so/m-p/1169742#M145511</guid>
      <dc:creator>Steve_Lionel</dc:creator>
      <dc:date>2019-09-27T13:43:30Z</dc:date>
    </item>
    <item>
      <title>Quote:Steve Lionel (Ret.)</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Hiding-symbols-in-dynamic-symbol-table-Linux-so/m-p/1169743#M145512</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Steve Lionel (Ret.) (Blackbelt) wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The compiler can't do anything about this - it's simply the way shared libraries work on Linux.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To&amp;nbsp;clarify my question -- Does the iFort compiler package for Linux use the gcc linker, and if so, can it support the&amp;nbsp;--version-script linker option?&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2019 18:47:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Hiding-symbols-in-dynamic-symbol-table-Linux-so/m-p/1169743#M145512</guid>
      <dc:creator>rorban</dc:creator>
      <dc:date>2019-09-27T18:47:28Z</dc:date>
    </item>
    <item>
      <title>I have had success on Linux</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Hiding-symbols-in-dynamic-symbol-table-Linux-so/m-p/1169744#M145513</link>
      <description>&lt;P&gt;I have had success on Linux using the option: --version-script=makeexportlist.txt&lt;/P&gt;&lt;P&gt;Where my "makeexportlist.txt" file lists the subroutine names that I want to export (such as "mySub1" and "mySub2")&amp;nbsp;and hides the rest of the subroutine names.&amp;nbsp; That file has the format:&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;&amp;nbsp; global: mySub1; mySub2;&lt;BR /&gt;&amp;nbsp; local: *;&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;References that were useful for&amp;nbsp;me:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.gnu.org/software/gnulib/manual/html_node/LD-Version-Scripts.html" target="_blank"&gt;https://www.gnu.org/software/gnulib/manual/html_node/LD-Version-Scripts.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.gnu.org/software/gnulib/manual/html_node/Exported-Symbols-of-Shared-Libraries.html" target="_blank"&gt;https://www.gnu.org/software/gnulib/manual/html_node/Exported-Symbols-of-Shared-Libraries.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Is this information what you're looking for?&lt;/P&gt;&lt;P&gt;Regards, Greg&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2019 21:11:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Hiding-symbols-in-dynamic-symbol-table-Linux-so/m-p/1169744#M145513</guid>
      <dc:creator>Greg_T_</dc:creator>
      <dc:date>2019-09-27T21:11:15Z</dc:date>
    </item>
    <item>
      <title>Quote:Greg T. wrote:</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Hiding-symbols-in-dynamic-symbol-table-Linux-so/m-p/1169745#M145514</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Greg T. wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have had success on Linux using the option: --version-script=makeexportlist.txt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi Greg -- This is what I am trying to do, and I am asking how to make this syntax work on the iFort command line.&lt;/P&gt;&lt;P&gt;In Linux I'm using Code:Blocks and I tried adding&amp;nbsp;--version-script=makeexportlist.txt to the Linker Settings&amp;gt;Other LInker Options window. This results in Code:Blocks just appending&amp;nbsp;--version-script=makeexportlist.txt to the end of the iFort command line generated by Code:Blocks, and when I build the project, iFort does not know what to do with this argument and emits a message that it is ignoring it.&lt;/P&gt;&lt;P&gt;So I am looking for the syntax (if it is possible) to make this work on the iFort command line such that the linker receives this&amp;nbsp;command and acts on it (assuming that iFort is using the gcc linker).&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2019 22:26:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Hiding-symbols-in-dynamic-symbol-table-Linux-so/m-p/1169745#M145514</guid>
      <dc:creator>rorban</dc:creator>
      <dc:date>2019-09-27T22:26:24Z</dc:date>
    </item>
    <item>
      <title>Yes, ifort uses the gcc</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Hiding-symbols-in-dynamic-symbol-table-Linux-so/m-p/1169746#M145515</link>
      <description>&lt;P&gt;Yes, ifort uses the gcc linker "ld".&lt;/P&gt;</description>
      <pubDate>Sat, 28 Sep 2019 00:47:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Hiding-symbols-in-dynamic-symbol-table-Linux-so/m-p/1169746#M145515</guid>
      <dc:creator>Steve_Lionel</dc:creator>
      <dc:date>2019-09-28T00:47:44Z</dc:date>
    </item>
    <item>
      <title>I found the syntax and got -</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Hiding-symbols-in-dynamic-symbol-table-Linux-so/m-p/1169747#M145516</link>
      <description>&lt;P&gt;I found the syntax and got --version-script= working: Add to the iFort command line&lt;/P&gt;&lt;P&gt;-Wl,--version-script=makeexportlist.txt&lt;/P&gt;&lt;P&gt;The next step is to check to see if I removed too much from the .so.&lt;/P&gt;</description>
      <pubDate>Sat, 28 Sep 2019 02:55:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Hiding-symbols-in-dynamic-symbol-table-Linux-so/m-p/1169747#M145516</guid>
      <dc:creator>rorban</dc:creator>
      <dc:date>2019-09-28T02:55:25Z</dc:date>
    </item>
  </channel>
</rss>

