Mail Archives: djgpp/2005/12/01/01:30:13
Linking in the standard libraries is automatic, and can sometimes
involve more than one libary... math, graphics, etc...
ObjDump might be able to tell us what modules are expected,
but if I understand the process correctly, it does not actually
specify _from_ which library, by name, the linker needs to grab
the external references from....
for if the object files had such information, we would not always
get bitten by forgetting to put the path and explicit name of a
library.
It would make for a very interesting project, to create a utility,
even if human-assisted, that would take the C and C++ sources,
and actually list each individual external library reference, by
starting with the full name of the library, and whats needed from it.
This brings me to my next serious observation:
When gcc (djgpp) compiles and creates each object file,
are the names of the external references just
"tossed in as they are encountered",
or is there some systematic organization done, where say,
all elements of the standard library first, then I see we need
stuff from math.lib, so those next, ok here are some graphics
functions, now lets categorize all graphics.lib external references.
My guess is no such task is performed, just that each external
reference is tossed in, and the linker has to do its best by being
manually handed the libraries and repeatedly scanning through
obj's and lib's until matches are resolved.
Does this sound right?
is there any paper/treatis on this process anywhere? THANKS.
On Wed, 30 Nov 2005 15:46:14 -0500, DJ Delorie <dj AT delorie DOT com> wrote:
>
>> Does DJGPP have a real or close equivalent to the
>> LDD utility? (List Dynamic Dependencies)
>
>DJGPP does not support dynamic linking, so no, there is no ldd.
- Raw text -