blob: 33ce4d49a14933b10f815b1808d3c599f3c96a8f [file] [log] [blame]
Guido van Rossum14421771994-09-14 14:06:46 +00001Subject: Dynamic Linking under HP-UX
2From: "C. Derek Fields" <derek@gamekeeper.bellcore.com>
3Date: Thu, 08 Sep 94 14:14:07 -0400
4
5There are two important points. First, the python executable must be
6linked with the -E option to explicitly export all symbols. This
7works with the vanilla interpreter, but I am not sure how friendly it
8will be when I try to embed the interpreter in a larger application.
9It may be necessary to hand tune the exports using the -e option.
10Anyway, the additional flag to $(CC) is "-Wl,-E", which passes the -E
11flag to the compiler. My link line (from an actual run) looks like
12this:
13
14cc config.o -Wl,-E libModules.a ../Python/libPython.a ../Objects/libObjects.a ../Parser/libParser.a -lm -ldld -o python
15
16Second, the dynamic module must be compiled with the +z option to make
17it position independent and then linked into a shared library:
18
19ld -b -o <modName>module.sl <object list>
20
21The -b tells the linker to produce a shared library.