<?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: Another share library question. in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/another-share-library-question/m-p/2493389#M728360</link>
    <description>If your "mylib" uses the thread-local-storage APIs, then the problem could well be this: when program A tries to shl_load shared-library B which in turn has mylib --if not as a run-time dependency-- at least as a build-time dependency, the classic dynamic-loader limitation is in effect, viz. it cannot load, at runtime, a library which either itself or through its dependents uses TLStorage.&lt;BR /&gt;&lt;BR /&gt;When you modify the build-script of program A to link with mylib at compile-time (instead of linking at run-time as a dependency of B), shl_load(B) does not have to load mylib because it is already there...&lt;BR /&gt;&lt;BR /&gt;Hope this explains it.</description>
    <pubDate>Wed, 14 Feb 2001 12:10:33 GMT</pubDate>
    <dc:creator>Kiran N. Mehta</dc:creator>
    <dc:date>2001-02-14T12:10:33Z</dc:date>
    <item>
      <title>Another share library question.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/another-share-library-question/m-p/2493388#M728359</link>
      <description>I have a program A which call a shared library b.sl, using shl_load.&lt;BR /&gt;the make file is:&lt;BR /&gt;b.sl: b.C&lt;BR /&gt;    $(CC)  +z -b -Wl,-E,-B,immediate,+s -o b.sl b.C -L/test/lib -lmylib&lt;BR /&gt;&lt;BR /&gt;A: A.C&lt;BR /&gt;    $(CC) -z +z -Wl,+s +DAportable -o A A.C -ldld                        &lt;BR /&gt;&lt;BR /&gt;mylib is another share library. mylib isn't used anywhere, just for test. &lt;BR /&gt;when I run A, I was told "can't load the library".(the shl_load return value is equal to NULL).&lt;BR /&gt;&lt;BR /&gt;After I changed my make file to this:&lt;BR /&gt;  &lt;BR /&gt;b.sl: b.C&lt;BR /&gt;    $(CC)  +z -b -Wl,-E,-B,immediate,+s -o b.sl b.C -L/test/lib -lmylib&lt;BR /&gt;&lt;BR /&gt;A: A.C&lt;BR /&gt;    $(CC) -z +z -Wl,+s +DAportable -o A A.C -ldld  -L /test/lib -lmylib &lt;BR /&gt;    &lt;BR /&gt;( add -L/test/lib -lmylib when compile A).&lt;BR /&gt; it can work correctly.&lt;BR /&gt; I use hp11 and aCC 3.25 and my SHLIB_PATH=.:/test/lib&lt;BR /&gt; I don't know the reason.</description>
      <pubDate>Wed, 14 Feb 2001 07:50:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/another-share-library-question/m-p/2493388#M728359</guid>
      <dc:creator>jack_8</dc:creator>
      <dc:date>2001-02-14T07:50:17Z</dc:date>
    </item>
    <item>
      <title>Re: Another share library question.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/another-share-library-question/m-p/2493389#M728360</link>
      <description>If your "mylib" uses the thread-local-storage APIs, then the problem could well be this: when program A tries to shl_load shared-library B which in turn has mylib --if not as a run-time dependency-- at least as a build-time dependency, the classic dynamic-loader limitation is in effect, viz. it cannot load, at runtime, a library which either itself or through its dependents uses TLStorage.&lt;BR /&gt;&lt;BR /&gt;When you modify the build-script of program A to link with mylib at compile-time (instead of linking at run-time as a dependency of B), shl_load(B) does not have to load mylib because it is already there...&lt;BR /&gt;&lt;BR /&gt;Hope this explains it.</description>
      <pubDate>Wed, 14 Feb 2001 12:10:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/another-share-library-question/m-p/2493389#M728360</guid>
      <dc:creator>Kiran N. Mehta</dc:creator>
      <dc:date>2001-02-14T12:10:33Z</dc:date>
    </item>
    <item>
      <title>Re: Another share library question.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/another-share-library-question/m-p/2493390#M728361</link>
      <description>thank you for your reply. I find the reason. I use shl_load only with bind_immediate. when I change to use shl_load with bind_immediate and bind_nonfatal. it can work. But one thing I can't understand is I add -Wl,B,immediate in the make file. I thought it can check unresolved symbol. but the fact is that it don't work. I don't know the reason. By the way, mylib is no relation to thread.</description>
      <pubDate>Wed, 14 Feb 2001 12:43:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/another-share-library-question/m-p/2493390#M728361</guid>
      <dc:creator>jack_8</dc:creator>
      <dc:date>2001-02-14T12:43:22Z</dc:date>
    </item>
  </channel>
</rss>

