Mail Archives: djgpp/2005/12/01/07:37:07
> 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....
You want the -Map option of the linker. Read the "ld" info pages.
> When gcc (djgpp) compiles and creates each object file, are the
> names of the external references just "tossed in as they are
> encountered",
Pretty much.
> 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.
No, not repeatedly. That's why the order of libraries on the command
line is important.
> is there any paper/treatis on this process anywhere? THANKS.
The linker manual. "info ld".
- Raw text -