Hello again,

some updates regarding the '# autoload' property in general, as well as
in combination with both 32 and 64 bit shared objects in one archive:

On 01/21/11 15:19, Michael Haubenwallner wrote:
> *) Create the Import File "shr.imp", containing
>    - this header:
>        #! libNAME.so.1(shr.o)
>        # autoload
>        #! libNAME.so.1(shr.o)
>    - the list of symbols exported.

> *) '# autoload' keeps a reference to the shared object in the
>    target binary even when not referenced by some static object.

The problem here is that there is no way to tell the '# autoload' to fire
in either 32 _or_ 64 bit mode only. So when using '# autoload', both 32 and
64 bit shared objects must have the _same_ member name, e.g. "(shr.o)".

When not using '# autoload' (or even independent of that), an additional
line indicating the bitness of the exported symbols would make sense -
either '# 32' or '# 64', to load the correct archive member when needed.

I tend to omit the '# autoload' (and the subsequent '#!') line, as this
is how it works with traditional shared libraries anyway:

>    Unfortunately, another shared object having undefined symbols provided
>    by this shared object does not trigger the latter to be referenced.

Additionally, the ld manpage for AIX [1] says for undefined symbols,
in section 'Import and Export File Format' [2]: "The main program must
export symbols imported by other modules, or loading will fail."

[1] 
http://publib.boulder.ibm.com/infocenter/aix/v6r1/topic/com.ibm.aix.cmds/doc/aixcmds3/ld.htm
[2] 
http://publib.boulder.ibm.com/infocenter/aix/v6r1/topic/com.ibm.aix.cmds/doc/aixcmds3/ld.htm#a3119106d

/haubi/

_______________________________________________
http://lists.gnu.org/mailman/listinfo/libtool

Reply via email to