A
Windows

Static linking in windows PE program?

Here I write all my PE with pens and came across an import table and static linking. According to the description, static linking checks the version of the library against the one listed in the table, and if everything matches, then it loads it. The problem is in the table, there is no address where to load the library, and given that most libraries will be loaded at 0x10000000, then obviously almost all will be loaded at other addresses. But there are no mechanisms for returning the dll load address (that is, I did not find it). And if you load everything yourself, then why is this binding at all? And is it possible to statically link system libraries?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Dubrovin, 2016-12-02
@z3apa3a

With dynamic linking through the import / export tables, the symbol addresses are immediately calculated and entered into the import table, so there is no need to additionally store the base address.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question