views:

62

answers:

2

eMbedded Visual C++ 3 project, building for PocketPC 2000. On the ARM build, the linker throws the following error:

fatal error LNK1223: invalid or corrupt file: file contains invalid pdata contributions

On SH3, the project compiles, links, and works. The project also works when built for ARM on Visual C++ 2005, but I need to test builds specifically from eVC3.

Any ideas, please? What's a pdata contribution and how do I affect (or disable) those? It's something to do with exception handling; I've tried disabling SEH by specifying /EHsc, to no effect.

A: 

No idea from me, but the Google-mind dredged up this thread which might give you a clue how to fix/workaround the problem... maybe:

After looking at the error more closely, I finally figured out that this is a side-effect of my hijacking of SC_SetDaylightTime() in the kernel with my own version. Apparently, something that I'm doing in my code there is causing the compiler to generate pdata entries that are wrong in some way. A strategically-placed #ifndef worked around it.

Michael Burr
A: 

Very weird. I tried commenting out everything in the file. The error went away when I commented out a function that was extern "C" void __declspec(naked) with no body (body #ifdef'fed away). I have similar functions in the project, but they did not throw any errors like this. Maybe a compiler bug...

Seva Alekseyev