<?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 Re: dlsym error in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/dlsym-error/m-p/4537411#M678633</link>
    <description>Thank you all. The suggestions worked. &lt;BR /&gt;&lt;BR /&gt;Can anyone suggest a material regarding the given solution to learn about it and more.</description>
    <pubDate>Tue, 24 Nov 2009 14:10:55 GMT</pubDate>
    <dc:creator>Sridhar B V</dc:creator>
    <dc:date>2009-11-24T14:10:55Z</dc:date>
    <item>
      <title>dlsym error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/dlsym-error/m-p/4537408#M678630</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I have created a shared library as below:&lt;BR /&gt;&lt;BR /&gt;1. # aCC -c +z myshlib.cxx&lt;BR /&gt;2. # ld -b -o libtest.so myshlib.o&lt;BR /&gt;&lt;BR /&gt;Now I wrote a sample program which loads this library through dlopen() and loads succesfully. When I search a symbol using dlsym it flashes an error saying unknown symbol. Here is the steps:&lt;BR /&gt;&lt;BR /&gt;3. # aCC sample.cxx -o result&lt;BR /&gt;4. ./result&lt;BR /&gt;dlsym: Unknown symbol sum&lt;BR /&gt;&lt;BR /&gt;I have attached both myshlib.cxx and sample.cxx &lt;BR /&gt;&lt;BR /&gt;Below is the machine details and compiler version.&lt;BR /&gt;&lt;BR /&gt;# uname -a&lt;BR /&gt;HP-UX bv750 B.11.31 U ia64 0223118237 unlimited-user license&lt;BR /&gt;# aCC -V&lt;BR /&gt;aCC: HP C/aC++ B3910B A.06.23 [May 18, 2009]&lt;BR /&gt;&lt;BR /&gt;Any inputs will be greatly appreciated. Thank you.</description>
      <pubDate>Fri, 20 Nov 2009 11:26:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/dlsym-error/m-p/4537408#M678630</guid>
      <dc:creator>Sridhar B V</dc:creator>
      <dc:date>2009-11-20T11:26:56Z</dc:date>
    </item>
    <item>
      <title>Re: dlsym error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/dlsym-error/m-p/4537409#M678631</link>
      <description>in C++ symbol names will be mangled. in your case, 'sum' is mangled as '_Z3sumii'. so if you dlsym for the mangled name, your test case works.&lt;BR /&gt;&lt;BR /&gt;if you dont want certain symbols to be mangled, use them within an 'extern "C"{}' block...</description>
      <pubDate>Sat, 21 Nov 2009 04:51:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/dlsym-error/m-p/4537409#M678631</guid>
      <dc:creator>Suprateeka R Hegde</dc:creator>
      <dc:date>2009-11-21T04:51:41Z</dc:date>
    </item>
    <item>
      <title>Re: dlsym error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/dlsym-error/m-p/4537410#M678632</link>
      <description>&amp;gt;Suprateeka: if you don't want certain symbols to be mangled, use them within an 'extern "C" {}' block.&lt;BR /&gt;&lt;BR /&gt;Right.  Also your pointer to function should be in one too:&lt;BR /&gt;extern "C" {&lt;BR /&gt;typedef int (*PIFII)(int, int);&lt;BR /&gt;}&lt;BR /&gt;...&lt;BR /&gt;PIFII fun;&lt;BR /&gt;fun = (PIFII)dlsym(dl_handle, "sum");&lt;BR /&gt;</description>
      <pubDate>Sat, 21 Nov 2009 18:40:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/dlsym-error/m-p/4537410#M678632</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-11-21T18:40:43Z</dc:date>
    </item>
    <item>
      <title>Re: dlsym error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/dlsym-error/m-p/4537411#M678633</link>
      <description>Thank you all. The suggestions worked. &lt;BR /&gt;&lt;BR /&gt;Can anyone suggest a material regarding the given solution to learn about it and more.</description>
      <pubDate>Tue, 24 Nov 2009 14:10:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/dlsym-error/m-p/4537411#M678633</guid>
      <dc:creator>Sridhar B V</dc:creator>
      <dc:date>2009-11-24T14:10:55Z</dc:date>
    </item>
    <item>
      <title>Re: dlsym error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/dlsym-error/m-p/4537412#M678634</link>
      <description>&amp;gt;Can anyone suggest a material regarding the given solution to learn about it&lt;BR /&gt;&lt;BR /&gt;Not much here:&lt;BR /&gt;&lt;A href="http://docs.hp.com/en/14487/gloss.htm#n" target="_blank"&gt;http://docs.hp.com/en/14487/gloss.htm#n&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Here is the ia64 mangling rules:&lt;BR /&gt;&lt;A href="http://www.codesourcery.com/public/cxx-abi/abi.html#mangling" target="_blank"&gt;http://www.codesourcery.com/public/cxx-abi/abi.html#mangling&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Basically you need to do mangling if you want to have overloading of functions and nested functions.</description>
      <pubDate>Wed, 25 Nov 2009 00:28:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/dlsym-error/m-p/4537412#M678634</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-11-25T00:28:16Z</dc:date>
    </item>
  </channel>
</rss>

