no concept of importing and exporting symbols on solaris ?

no concept of importing and exporting symbols on solaris ?

Post by shiva.. » Sat, 09 Mar 1996 04:00:00



Dear Solaris Gurus,

        How can we export or import symbols while dynamically linking
shared objects on Solaris ? On AIX, for example, we use import and
export files.
        The dlopen() function does not bind all the symbols on loading, hence,
dlsym() HAS to be used for every symbol that is exported.
        What is the equivalent of an export (symbols) file on Solaris?

        Thanks.
        Shiva.

 
 
 

no concept of importing and exporting symbols on solaris ?

Post by Casper H.S. D » Mon, 11 Mar 1996 04:00:00



>    How can we export or import symbols while dynamically linking
>shared objects on Solaris ? On AIX, for example, we use import and
>export files.
>    The dlopen() function does not bind all the symbols on loading, hence,
>dlsym() HAS to be used for every symbol that is exported.
>    What is the equivalent of an export (symbols) file on Solaris?

What are you trying to do?  I don't understand what you mean with
"does not bind all the symbols on loading".  What should
the symbols be bound to?

If you mean that other dlopened objects don't get to see those symbols,
you're correct, but te symbols can be made globablly visilble by using
the RTLD_GLOBAL flag to dlopen().

Casper
--
Casper Dik - Sun Microsystems - via my guest account at the University

Statements on Sun products included here are not gospel and may
be fiction rather than truth.

 
 
 

no concept of importing and exporting symbols on solaris ?

Post by shiva.. » Tue, 12 Mar 1996 04:00:00




> >       How can we export or import symbols while dynamically linking
> >shared objects on Solaris ? On AIX, for example, we use import and
> >export files.
> >       The dlopen() function does not bind all the symbols on loading, hence,
> >dlsym() HAS to be used for every symbol that is exported.
> >       What is the equivalent of an export (symbols) file on Solaris?

> What are you trying to do?  I don't understand what you mean with
> "does not bind all the symbols on loading".  What should
> the symbols be bound to?

> If you mean that other dlopened objects don't get to see those symbols,
> you're correct, but te symbols can be made globablly visilble by using
> the RTLD_GLOBAL flag to dlopen().

> Casper
> --
> Casper Dik - Sun Microsystems - via my guest account at the University

> Statements on Sun products included here are not gospel and may
> be fiction rather than truth.

        I first load file1 from main module using dlopen()(tried all
combinations of RTLD...). Then load file2 from main module again using
dlopen(). For file2, made sure that I used RTLD_GLOBAL, and experimented
"orring" with RTLD_NOW. But file2 was not able to access symbols in
file1, even then (for symbols in file1 not "dlsym"ed ).
        I also tried using:
        file1 :RTLD_NOW
        file2:RTLD_GLOBAL || RTLD_NOW

        file1:RTLD_LAZY
        file2:RTLD_GLOBAL || RTLD_NOW

        file1:RTLD_GLOBAL || RTLD_NOW
        file2: RTLD_GLOBAL ||RTLD_NOW

        file1 and file2 are shared objects compiled and linked with
-G option.

        The above problem gets solved only when I link file1.so  to file2.so
when making file2.so
        So, your suggestion to used RTLD_GLOBAL for file2.so does/did
not work.
        Any other suggestions ?
        Thanks for your help.
Shiva.

 
 
 

no concept of importing and exporting symbols on solaris ?

Post by Hal Snyd » Fri, 15 Mar 1996 04:00:00



>    I first load file1 from main module using dlopen()(tried all
>combinations of RTLD...). Then load file2 from main module again using
>dlopen(). For file2, made sure that I used RTLD_GLOBAL, and experimented
>"orring" with RTLD_NOW. But file2 was not able to access symbols in
>file1, even then (for symbols in file1 not "dlsym"ed ).
...
>    file1 and file2 are shared objects compiled and linked with
>-G option.

>    The above problem gets solved only when I link file1.so  to file2.so
>when making file2.so

We ran into the same problem with NCR/AT&T SVR4 last year.  We were
told that it was a known bug, but that a fix was not forthcoming
because the problem lies deep in the implementation of dynamic linking
in the OS.
~
~
~
~
~
~
~
~
 
 
 

1. symbols export/import

hi, i'm coding a module for kernel 2.4.
i've managed the way of exporting no symbols with the macro
EXPORT_NO_SYMBOLS.
now, as far as my module is inspired from another module (khttpd), some
functions have the same name of khttpd's ones but behave differently.
looking at /proc/modules i found this:

my_module       20877   1
khttpd          24272   3       [my_module]

how can i avoid this? i don't want to use khttpd's functions and such
dependence doesn't allow to rmmod khttpd before my_module.

bye
--

Designed for Windows
Powered by Linux

2. looking for info on vnews

3. Exporting symbols in Solaris ?

4. Disks are really slow.

5. importing/exporting nis+ tables

6. WARNING: WP for Linux Seg Faults!

7. Koffice import/export ability?

8. pts/ configuration

9. File system exporting to/importing from MSDOS?

10. UserDB(Files) export-import

11. export and import mail

12. Export/import mail/folders between Kmail, Netscape and other

13. Is Exporting Modem from Linux-Server and Import to WIN95-Client possible??