Import files and AIX 4.1.4

Import files and AIX 4.1.4

Post by Marc Missir » Fri, 15 Nov 1996 04:00:00



I have read the ld man page,  and read all I could find
in IBM's "General Programming Concepts",  but still have some
questions regarding import files on AIX 4.1.4.  I am hoping someone here
can help me clear them up.

I see how an import file can help with the problem of two
shared libraries calling functions in each other.  Normally,
AIX would give you an unresolved symbol error when you tried
to link either of these.  An import file with a #! line at the
top tells AIX to resolve these symbols at load time,  and where
to find them.

Note that I cannot seem to make this work unless I have a #! line at
the top,  yet I keep reading that the #! line is optional.  What use IS
an import file,  other than the one I decribed above?

Is there a reason for having an import file without a #! line?
If not,  is there a way for AIX to be told to use LIBPATH
to resolve these symbols,  and not the path in the #! line?

Thanks in advance for any help or pointers to information
about AIX import files.

 
 
 

Import files and AIX 4.1.4

Post by Stephen B. Peckh » Wed, 20 Nov 1996 04:00:00




Quote:>I have read the ld man page,  and read all I could find
>in IBM's "General Programming Concepts",  but still have some
>questions regarding import files on AIX 4.1.4.  I am hoping someone here
>can help me clear them up.

>I see how an import file can help with the problem of two
>shared libraries calling functions in each other.

An import file and a shared object are interchangable with respect to
linking another module.  An import file is generally required to build
the first of two mutually dependent modules, but the second module can
be linked with the first.

Quote:>AIX would give you an unresolved symbol error when you tried
>to link either of these.  An import file with a #! line at the
>top tells AIX to resolve these symbols at load time,  and where
>to find them.

>Note that I cannot seem to make this work unless I have a #! line at
>the top,  yet I keep reading that the #! line is optional.  What use IS
>an import file,  other than the one I decribed above?

>Is there a reason for having an import file without a #! line?

An import file and an export file have the same syntax.  When used as
an export file, the #! line is ignored.  Thus, for an export file, the #!
is not needed.  If you omit the #! line in an import file, the linker will
use the basename of the import file as the basename of the shared object
at run time.  This can work, but is usually not very useful.

Quote:>If not,  is there a way for AIX to be told to use LIBPATH
>to resolve these symbols,  and not the path in the #! line?

You #! line should not contain a path.  The 'ld' man page describes
all this.  You can list the symbols for libc with the line:
#! libc.a(shr.o)

You are allowed to provide a path, which is used directly at run time,
without searching directories.

 
 
 

1. Importing existing passwd and group file to aix 3.1

 We have aquired an rs6000. We would like to be able to copy our existing
 password file over to the system and have it work. (We distribute a
 master password file to our yp domains, and the RS-6000 should set
 in a different domain than everyone else). When one copies the password
 file over one can log in as a user but an error message is created about
 being unable to set terminal permission and the user is logged off.
 Trying via telent yields similar results and a message that the
 connection was closed.

 A second related question. We have a central administration for uid's.
 If one creates a user using SMIT how can one set the uid for the user
 short of going thru the change user mechanism?

 Thank you for your help.

2. something is missing!

3. import files on AIX 4.1.4

4. Smbmount won't mount.

5. Kmail Import won't import address book

6. metacharacter ?

7. Matrox Mystique ands X.

8. mgetty only get 9600bps

9. apache, aix and error 'not an import library'

10. importing volume group in AIX

11. Re-import VG across AIX releases

12. HELP: File import

13. import passwd file from different UNIX