Initialization problem of shared library in HP-UX11

Martin v. Loewis martin at v.loewis.de
Mon Apr 1 17:53:38 EST 2002


flz at cfdrc.com (gother) writes:

> I know windows do the initialization when it load the shared lib. In
> HP, when the shared lib links to an main function, it do the same
> thing. But somehow HP-UX11 failed to do it inside the python which
> called shl_load function. So I guess inside the executable the shared
> lib is loaded with different system function call instead of shl_load
> or different arguments of shl_load. If anybody be familar with the
> internal loading process of HP, he must have the answer.

Perhaps the answer is: It just can't work; it is a known deficiency of
HP-UX. Then you are back to my suggestion. I don't know whether this
would be a correct answer.

Now that you seem to want understanding this, we should debug it it
step by step. 

First question: What is the command line that you use to link the
extension module?

If it starts with 'ld', that could explain it. Many systems require
special options to the linker (in particular addition of object
files) to support initialization of shared libraries.

If it starts with 'gcc', that still could explain it. Try the system
compiler; it might be a bug in gcc.

If it is the bundled C compiler, this definitely explains it.

If it is the unbundled compiler, next question:

What is the documentation for all the command line option you are
giving? What other options related to shared libraries are mentioned
in the documentation of ld(1) and c89(1)?

And so on. It is unlikely that you find a lot of HP-UX expertise in
this group - I recommend to contact HP.

Regards,
Martin



More information about the Python-list mailing list