how to use export/import files to create an object to be loaded at runtime

how to use export/import files to create an object to be loaded at runtime

Post by mich » Mon, 14 Jun 1999 04:00:00



hi,
the man-pages for load and ld are not so easy to understand.
i created an executable which will at runtime "load" an object  .
this object contains calls to entry points actually located in the main
executable.
i could link those entry-points also into the object to be loaded, but
there must be a way at link time to tell the linker that they entry
points
are to be resolved at runtime.
any responses, please attach a small example if you can.
i am sure there are many people out there who would like to understand
this once for all.
thanks
Mike
 
 
 

how to use export/import files to create an object to be loaded at runtime

Post by Jens-Uwe Mag » Mon, 14 Jun 1999 04:00:00



>the man-pages for load and ld are not so easy to understand.
>i created an executable which will at runtime "load" an object  .
>this object contains calls to entry points actually located in the main
>executable.
>i could link those entry-points also into the object to be loaded, but
>there must be a way at link time to tell the linker that they entry
>points
>are to be resolved at runtime.

You will have to use the export file of the main part as an import file for
the loaded object. Later then the routine that performs the load should use
loadbind() to resolve any symbols.

--
Jens-Uwe Mager  <pgp-mailto:62CFDB25>

 
 
 

how to use export/import files to create an object to be loaded at runtime

Post by mich » Tue, 15 Jun 1999 04:00:00


Hi everybody,
I found a URL which explains through examples how to solve my problem :
http://ike.engr.washington.edu/arch/usenet/aix/9503.4/msg00414.html

thanks Jens-Uwe for your input.

Micha

 
 
 

1. Creating Exports and Imports file for shared library

I am trying to create a shared library on AIX RS/6000 and I am having
trouble finding the best way to create the exports and imports files.
Currently I am running /usr/ucb/nm on my non-shared library and grep'ing
for global text and data symbols, however I get duplicate definitions,
like:

Function  
.Function

Which of these should be used for an import or export file? (if either)
Does anyone have any suggestions on the "best" way to generate the
list of exported and imported symbols for a shared library?
I know that once I already HAVE a shared libary (like /lib/libc.a) I
can use dump -Tv library | awk '$2 == "EXP" {print $8}' , but
I don't know what to do on a non-shared library.
Any suggestions would be greatly appreciated.
Please email replies to


Thank you.

2. SCSI error 02080513

3. Import/export between shared objects

4. Selecting between sockets & memory

5. How to load library objects during runtime?

6. Exp w CDwriter SW "GEAR" sought, Multisession CDs?

7. Loading and Executing Object Code at Runtime

8. Linux lasted a week at my company.

9. Help with creating shared libraries (C++ using makeC++SharedLib_r and export files)

10. File system exporting to/importing from MSDOS?

11. UserDB(Files) export-import

12. Creating A Script to Load a File By using the current date

13. File system exporting to/importing from MSDOS?