<?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: shl_load problem in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/shl-load-problem/m-p/5210078#M652265</link>
    <description>hi dennis and Suprateeka,&lt;BR /&gt;&lt;BR /&gt;Ok, now in the code , there is just some lines:&lt;BR /&gt;&lt;BR /&gt;shl_t shl;&lt;BR /&gt;        shl = shl_load("libcrypto.sl",DYNAMIC_PATH|BIND_IMMEDIATE, 0);&lt;BR /&gt;        if(shl)&lt;BR /&gt;        {&lt;BR /&gt;                printf("shl_load ok\n");&lt;BR /&gt;                return 0;&lt;BR /&gt;        }&lt;BR /&gt;        else&lt;BR /&gt;                printf("shl_load error\n");&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;and I compile the code like:&lt;BR /&gt;cc -g -o shl_load shl_load.c&lt;BR /&gt;and chatr +s enable shl_load&lt;BR /&gt;and run ./shl_load&lt;BR /&gt;&lt;BR /&gt;and the error : error: No such file or directory.&lt;BR /&gt;&lt;BR /&gt;It seems that the shl_load is try to load the libcrypto.sl in the current directory,but there is no libcrypto.sl then&lt;BR /&gt;it says that no such files.&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Mon, 23 Nov 2009 10:02:07 GMT</pubDate>
    <dc:creator>yangk</dc:creator>
    <dc:date>2009-11-23T10:02:07Z</dc:date>
    <item>
      <title>shl_load problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shl-load-problem/m-p/5210072#M652259</link>
      <description>Hi all,&lt;BR /&gt;&lt;BR /&gt;I just want to shl_load a dynamic library just with the name of libray, but it not work.&lt;BR /&gt;&lt;BR /&gt;I load the dynamic library as following:&lt;BR /&gt;&lt;BR /&gt;shl_load("libxxx.sl",BIND_IMMEDIATE,0);&lt;BR /&gt;&lt;BR /&gt;but it will not load library successfully.&lt;BR /&gt;&lt;BR /&gt;When using shl_load with absolute path is will load successfully.&lt;BR /&gt;&lt;BR /&gt;shl_loa("/usr/lib/libxxx.sl",BIND_IMMEDIATE,0);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;So is there way to load the dynamic library not with absolute path?&lt;BR /&gt;Thanks!&lt;BR /&gt;</description>
      <pubDate>Wed, 18 Nov 2009 07:02:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shl-load-problem/m-p/5210072#M652259</guid>
      <dc:creator>yangk</dc:creator>
      <dc:date>2009-11-18T07:02:08Z</dc:date>
    </item>
    <item>
      <title>Re: shl_load problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shl-load-problem/m-p/5210073#M652260</link>
      <description>&amp;gt;So is there way to load the dynamic library not with absolute path?&lt;BR /&gt;&lt;BR /&gt;Check shl_load(3):&lt;BR /&gt;shl_load("libxxx.sl", DYNAMIC_PATH|BIND_IMMEDIATE, 0);</description>
      <pubDate>Wed, 18 Nov 2009 07:42:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shl-load-problem/m-p/5210073#M652260</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-11-18T07:42:53Z</dc:date>
    </item>
    <item>
      <title>Re: shl_load problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shl-load-problem/m-p/5210074#M652261</link>
      <description>Hi dennis,&lt;BR /&gt;&lt;BR /&gt;I have try your method but it seems that it also does not work.&lt;BR /&gt;&lt;BR /&gt;shl = shl_load("libcrypto.sl",DYNAMIC_PATH|BIND_IMMEDIATE, 0);&lt;BR /&gt;&lt;BR /&gt;even if I use the putenv to set the SHLIB_PATH=/usr/lib and dld_getenv befor calling the shl_load, it also don't work.&lt;BR /&gt;&lt;BR /&gt;Here is my code:&lt;BR /&gt;....&lt;BR /&gt;sprintf(strpath, "%s%s","SHLIB_PATH=",argv[1]);&lt;BR /&gt;        printf("strpath is %s\n",strpath);&lt;BR /&gt;        putenv(strpath);&lt;BR /&gt;        str=getenv("SHLIB_PATH");&lt;BR /&gt;        printf("str is %s\n",str);&lt;BR /&gt;        dld_getenv();&lt;BR /&gt;        shl = shl_load("libcrypto.sl",DYNAMIC_PATH | BIND_IMMEDIATE ,0);&lt;BR /&gt;if(!shl)&lt;BR /&gt;        {&lt;BR /&gt;                printf("shl_load failed\n");&lt;BR /&gt;                printf("shl_load.rc=%s\n",strerror(errno));&lt;BR /&gt;                exit(-1);&lt;BR /&gt;        }&lt;BR /&gt;        printf("shl_load successed\n");&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;compile the code as following:&lt;BR /&gt;cc -g -o shl_load shl_load.c&lt;BR /&gt;and run shl_load with /usr/lib args&lt;BR /&gt;&lt;BR /&gt;But it can not load successfully.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 18 Nov 2009 09:19:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shl-load-problem/m-p/5210074#M652261</guid>
      <dc:creator>yangk</dc:creator>
      <dc:date>2009-11-18T09:19:40Z</dc:date>
    </item>
    <item>
      <title>Re: shl_load problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shl-load-problem/m-p/5210075#M652262</link>
      <description>I have done the test on PA 11.23 system</description>
      <pubDate>Wed, 18 Nov 2009 09:21:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shl-load-problem/m-p/5210075#M652262</guid>
      <dc:creator>yangk</dc:creator>
      <dc:date>2009-11-18T09:21:47Z</dc:date>
    </item>
    <item>
      <title>Re: shl_load problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shl-load-problem/m-p/5210076#M652263</link>
      <description>you should also do a "chatr +s enable" your program so that dynamic loader honours SHLIB_PATH. see chatr_pa(1) for more info on +s and +b options. or you can pass the linker option +s (-Wl,+s to the compiler) and you dont have to use chatr later.</description>
      <pubDate>Sat, 21 Nov 2009 05:34:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shl-load-problem/m-p/5210076#M652263</guid>
      <dc:creator>Suprateeka R Hegde</dc:creator>
      <dc:date>2009-11-21T05:34:23Z</dc:date>
    </item>
    <item>
      <title>Re: shl_load problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shl-load-problem/m-p/5210077#M652264</link>
      <description>&amp;gt;if I use the putenv to set the SHLIB_PATH=/usr/lib&lt;BR /&gt;&lt;BR /&gt;Since this is the default, it is a waste of time doing that.  And if you know it, why not add it to the library string?&lt;BR /&gt;&lt;BR /&gt;As Suprateeka mentioned, the PA default is not to enable SHLIB_PATH.  For Integrity, LD_LIBRARY_PATH is enabled by default.</description>
      <pubDate>Sat, 21 Nov 2009 18:24:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shl-load-problem/m-p/5210077#M652264</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-11-21T18:24:06Z</dc:date>
    </item>
    <item>
      <title>Re: shl_load problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shl-load-problem/m-p/5210078#M652265</link>
      <description>hi dennis and Suprateeka,&lt;BR /&gt;&lt;BR /&gt;Ok, now in the code , there is just some lines:&lt;BR /&gt;&lt;BR /&gt;shl_t shl;&lt;BR /&gt;        shl = shl_load("libcrypto.sl",DYNAMIC_PATH|BIND_IMMEDIATE, 0);&lt;BR /&gt;        if(shl)&lt;BR /&gt;        {&lt;BR /&gt;                printf("shl_load ok\n");&lt;BR /&gt;                return 0;&lt;BR /&gt;        }&lt;BR /&gt;        else&lt;BR /&gt;                printf("shl_load error\n");&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;and I compile the code like:&lt;BR /&gt;cc -g -o shl_load shl_load.c&lt;BR /&gt;and chatr +s enable shl_load&lt;BR /&gt;and run ./shl_load&lt;BR /&gt;&lt;BR /&gt;and the error : error: No such file or directory.&lt;BR /&gt;&lt;BR /&gt;It seems that the shl_load is try to load the libcrypto.sl in the current directory,but there is no libcrypto.sl then&lt;BR /&gt;it says that no such files.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 23 Nov 2009 10:02:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shl-load-problem/m-p/5210078#M652265</guid>
      <dc:creator>yangk</dc:creator>
      <dc:date>2009-11-23T10:02:07Z</dc:date>
    </item>
    <item>
      <title>Re: shl_load problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shl-load-problem/m-p/5210079#M652266</link>
      <description>&amp;gt;It seems that the shl_load is try to load the libcrypto.sl in the current directory but there is no libcrypto.sl&lt;BR /&gt;&lt;BR /&gt;Have you exported SHLIB_PATH where it should look?  Perhaps I was incorrect about a default.</description>
      <pubDate>Mon, 23 Nov 2009 16:38:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shl-load-problem/m-p/5210079#M652266</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-11-23T16:38:50Z</dc:date>
    </item>
    <item>
      <title>Re: shl_load problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shl-load-problem/m-p/5210080#M652267</link>
      <description>yes, &lt;BR /&gt;I have try to export SHLIB_LIB=/usr/lib/,&lt;BR /&gt;then it works.&lt;BR /&gt;&lt;BR /&gt;But I just want to know why I use the putenv to set the SHLIB_LIB, it does not work well&lt;BR /&gt;as export SHLIB_PATH.&lt;BR /&gt;&lt;BR /&gt;It is so weird to me.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 26 Nov 2009 02:35:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shl-load-problem/m-p/5210080#M652267</guid>
      <dc:creator>yangk</dc:creator>
      <dc:date>2009-11-26T02:35:06Z</dc:date>
    </item>
    <item>
      <title>Re: shl_load problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shl-load-problem/m-p/5210081#M652268</link>
      <description>&amp;gt;want to know why I use the putenv to set the SHLIB_LIB, it does not work&lt;BR /&gt;&lt;BR /&gt;dld has already read the value of SHLIB_LIB, why should it look again?</description>
      <pubDate>Thu, 26 Nov 2009 03:16:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shl-load-problem/m-p/5210081#M652268</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-11-26T03:16:45Z</dc:date>
    </item>
    <item>
      <title>Re: shl_load problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shl-load-problem/m-p/5210082#M652269</link>
      <description>Ok , i know. Thank you very much!&lt;BR /&gt;I will close it!</description>
      <pubDate>Thu, 03 Dec 2009 02:25:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shl-load-problem/m-p/5210082#M652269</guid>
      <dc:creator>yangk</dc:creator>
      <dc:date>2009-12-03T02:25:43Z</dc:date>
    </item>
  </channel>
</rss>

