在DLL中,函数表的结构如何? [英] Within a DLL, how is the function table structured?

查看:140
本文介绍了在DLL中,函数表的结构如何?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在研究不明确支持我的操作系统的设备库的实现。特别是我有一个反汇编的DLL,并且有相当数量的支持源代码。现在,函数表/导出表的结构如何?

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?

我的理解是, .data 部分是RVA表。接下来是通过索引链接到该第一个地址表的字符串表。这对我来说是有道理的,因为链接器可以在符号和地址之间进行转换。

My understanding is that the first structure of the .data section is a table of RVAs. 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.

如何将序数引用到这个图片中?如何知道哪个函数有这样的序号,链接器如何解决这个问题?换句话说,考虑到一些其他DLL导入 SOME_LIBRARY_ordinal_7 ,链接器如何知道要使用哪个功能?

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?

感谢所有!

编辑
更多信息..

edit More information...

我正在使用FTDI库,并希望解析正在调用哪个函数。特别是,我看到如下:

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?

推荐答案

要了解连接器和加载器如何在Windows上运行,可能最容易获取的信息来自于Matt Pietrek十多年前所做的一系列:

To learn how the linkers and the loader works on Windows, probably the most accessible information comes from a set of columns Matt Pietrek did more than a decade ago:

  • July 1997: http://www.microsoft.com/msj/0797/hood0797.aspx
  • April 1998: http://www.microsoft.com/msj/0498/hood0498.aspx
  • September 1999: http://www.microsoft.com/msj/0999/hood/hood0999.aspx

最大的a最好的一个:

  • Peering Inside the PE: A tour of the Win32 Portable Executable File Format (from 1994!)

这篇关于在DLL中,函数表的结构如何?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆