dynamic loading vs. dynamic linking

dynamic loading vs. dynamic linking

Post by Richard L. Goerwi » Fri, 02 Sep 1994 11:30:54



How difficult would it be to add dynamic loading, like what we find
in the dlfcn.h interface found on many systems, to Linux?

--



 
 
 

dynamic loading vs. dynamic linking

Post by Kai Petz » Sat, 10 Sep 1994 07:11:19



Quote:>How difficult would it be to add dynamic loading, like what we find
>in the dlfcn.h interface found on many systems, to Linux?

It has already been done.  Take a look at the dld library, as found
on tsx-11 in /pub/linux/sources/libs.  The newest version, that I am
aware of, is 3.2.4.

Kai
--
Kai Petzke                      | How fast can computers get?
Technical University of Berlin  |
Berlin, Germany                 | Sol 9, of course, on Star Trek.


 
 
 

1. dynamic loading: linker bug w.r.t. --export-dynamic ?

Hi

I have file1.c that defines function fn. I also have file2.c that _declares_
function fn (with the same signature).

I use file1.c to make an exectuable file1 :

gcc -rdynamic -c file1.c
gcc -rdynamic --export-dynamic -o file1 file1.o -ldl )

And I use file2.c to make a shared library ./libfile2.so :

gcc -rdynamic -c file2.c
gcc -shared -rdynamic --export-dynamic -o libfile2.so file2.o

file1 dynamically loads libfile2.so at run-time. This loading fails at
run-time if and only if file2 _uses_ the aforementioned function fn :

./libfile2.so: undefined symbol: fn

I'm a very puzzled by this, since ld manual says, in part:

"--export-dynamic
    When  creating a dynamically linked executable, add all symbols
    to the dynamic symbol table.  The dynamic symbol table is the
    set of symbols which are visible from dynamic objects at run time."

Is this option being ignored? (I use some compiler and linker options
redundantly just in case)

My system is Debian 3.0; dl library is part of libc6 2.2.5;
I got the same results with GCC 3.2.2 and GCC 2.95.4

Thank you
Oleg

2. How to terminate all child processes?

3. time launching aspect : static link vs dynamic link

4. Anyone use SUP for mirroring Web content ?

5. dynamic linking vs. static linking

6. A suggestion for the netfilter part of the sources

7. : Can a dynamic link library determine the name of the file it was loaded from?

8. New Group: comp.os.linux.X ?????

9. Dynamic Link/Loading for Linux.

10. Dynamic Linking and Loading in an odd way

11. dynamic binding, linking, loading etc

12. HELP! dynamic linking/loading prog

13. Dynamic Linking & Loading.