“.refptr.”是什么意思?意思是在 mingw64 .def 文件中?

What does ".refptr." mean in a mingw64 .def file?

在 Windows 7 上调查与 mingw64 4.9.2 的崩溃 dll 链接,我查看了提供给链接器的生成的 .def 文件,发现 1419 个出口中的前 391 个所有名称的形式都是 .refptr.FooBar。相同的构建,使用 mingw64 4.6.3 链接成功,在这种情况下 .def 文件不包含此类导出。

谁能告诉我这些 .refptr. 前缀是什么意思?谷歌搜索无济于事。

Hans Passant 的 GCC 补丁的相关部分 link:

This feature is required for upcoming new cygwin x64 target, which uses full 48-bit available address-space of x64 Windows. The cygwin-target depends on pseudo-relocation-feature, which operates on instruction relocations. This can lead for x86_64 to issues, due instructions are in general signed-32bit-pc-relative relocated. So distances can become too wide for pseudo-relocation. Due for functions we generate anyway on pe-coff targets jump-stubs, we just need to make sure that variables are accessed via reference-pointer-variables. So we add for them in medium model .refptr-variables.

我发现我的 linker 崩溃可以在没有附带损害的情况下得到补救 只需从 .def 文件中删除所有 .refptr. 前缀即可。 (显然不会总是那么幸运)