I have a Windows 8 metro app written in c++ that I’m trying to compile to ARM. During linking, I get many instances of the following error:
"error LNK2013: BLX23(T) fixup overflow. Target '<mangledName>' is out of range"
The MSDN site says:
“You can resolve this problem by creating multiple images or by using the /ORDER option so the instruction and target are closer together.”
But I don’t really get it how to make that work. The symbols in question are compiler-generated and there is no Itanium Architecture involved, so the other suggestions on that page don’t apply. Also, the files with errors are *.g.cpp files, generated by the compiler from xaml pages included in the project.
The metro application runs just fine on Win32 configuration, so I wonder if someone with more experience on ARM could have a better idea of how to solve this sort of issue.
The setup is Visual Studio 2012 RC on Windows 8 RP x64.
This is due to an unfortunate bug in incremental linking on ARM, and can be worked around by disabling incremental link. As mentioned in the other answer, this is because the called function and callsite are so far away from each other that the linker needs to insert long branch islands (and there is a very particular bug with creation of long branch islands when using incremental link).
To my knowledge, this bug was not fixed for RTM (when I discovered this issue myself it was too late to fix for the RTM release) but it is known and planned to be fixed for a future release.