Investigating a crashing dll linkage with mingw64 4.9.2 on Windows 7, I looked into the generated .def file that is fed to the linker and saw that the first 391 of the 1419 exports all had names of the form .refptr.FooBar. The same build, using mingw64 4.6.3 linked successfully, and in that case the .def file contained no such exports.
Can anyone tell me what these .refptr. prefixes mean? Googling was to no avail.
The relevant portion of Hans Passant's GCC patch 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.
I found that my linker crash could be remedied without collateral damage
simply by deleting all the .refptr. prefixes from the .def file.
(Clearly one would not always be so lucky)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With