Within a DLL, how is the function table structured?

Posted by Willi Ballenthin on Stack Overflow See other posts from Stack Overflow or by Willi Ballenthin
Published on 2010-02-21T22:43:16Z Indexed on 2010/03/09 5:06 UTC
Read the original article Hit count: 182

Filed under:
|
|

I've been looking into the implementation of a device library that doesn't explicitly support my operating system. In particular, I have a disassembled DLL, and a fair amount of supporting source code. Now, how is the function table/export table structured?

My understanding is that the first structure of the .data section is a table of VRAs. Next is a table of strings linked by index to that first address table. This makes sense to me, as a linker could translate between symbols and addresses.

How do functions referenced by ordinals fit into this picture? How does one know which function has such and such ordinal number, and how does the linker resolve this? In other words, given that some other DLL imports SOME_LIBRARY_ordinal_7, how does the linker know which function to work with?

Thanks, all!

edit More information...

Im working with the FTDI libraries, and would like to resolve which function is being invoked. In particular, I see something like:

extern FTD2XX_Ordinal_28: near

how might I go about determining which function is being referenced, and how does the linker do this?

© Stack Overflow or respective owner

Related posts about assembly

Related posts about dll