windows RT and 32-bit ARM assembly
I'm using vs2012/vs2013 and I'm pretty convinced that assembler/linker from Microsoft are pile of turd.
I need to run some 32-bit ARM asm, but some dickhead at microft decided that all that 32-bit part of ARM chips is useless iron and therefore shouldn't be supported in the latest and greatest reincarnation of windows.
Previously, it was IMAGE_FILE_MACHINE_ARM, format generated by cegcc and all ms compilers. Then they also had IMAGE_FILE_MACHINE_THUMB for Thumb.
Now they have some freaking strange ****:
#define IMAGE_FILE_MACHINE_ARMNT 0x01c4 // ARM Thumb-2 Little-Endian
WTF is that ARMNT?! Ok, it's thumb2, why the **** they called it ARMNT... anyways, any arm object file that doesn't have that ARMNT header is considered to be invalid by their ****ty linker. E.g. it supports only ARMNT (a.k.a. Thumb-2). I tried all kinds of tricks, but it seems that I cannot figure out how to execute 32-bit ARM code. I tried to assemble it as THUMB file, but internally using directives switch to ARM mode, but then there are nonsense linker errors:
error LNK2013: BRANCH24(A) fixup overflow. Target 'DotProduct12_neon is out of range.
Here's the sample asm
No matter what I try, I cannot make it work. It looks like I can export and run 32-bit ARM functions from THUMB sections as long as there is no relative code (e.g. there is no branches etc). Also, when i modify it to be ARM instead of THUMB (in the asm file), then debugger simply breaks on entry point to DotProduct12_neon ... but some times it works. Very strange behavior. Anybody ahs any idea about it?