D
David T. Ashley
I've occasionally had trouble compiling and linking programs that use shared
libraries. That never made a lot of sense to me, because I thought the
operating system went hunting for the symbols and libraries at runtime (and
not before).
Questions:
a)How do the development tools know that a given symbol (a function entry
point, for example) is located in a shared library and won't be linked in
statically?
b)When a shared library is used and you compile and link a program, what
happens during the "link" step? (Does the OS be sure the symbols exist, be
sure it knows the location of the shared library, what?)
c)Is the location of the shared library embedded in the ELF file somehow?
d)As an example, when one compiles applications to use GMP, one includes
"gmp.h". I need to look at this header file ... but is the location of the
library on the target system in this file?
Thanks.
libraries. That never made a lot of sense to me, because I thought the
operating system went hunting for the symbols and libraries at runtime (and
not before).
Questions:
a)How do the development tools know that a given symbol (a function entry
point, for example) is located in a shared library and won't be linked in
statically?
b)When a shared library is used and you compile and link a program, what
happens during the "link" step? (Does the OS be sure the symbols exist, be
sure it knows the location of the shared library, what?)
c)Is the location of the shared library embedded in the ELF file somehow?
d)As an example, when one compiles applications to use GMP, one includes
"gmp.h". I need to look at this header file ... but is the location of the
library on the target system in this file?
Thanks.