I'm trying to convert a Windows based library that my company produces to run on AIX. We are currently able to run it on Solaris and Linux but AIX is causing some additional issues. I'm not sure if this is an OS setup issue or a coding issue but I'm trying the coding approach first. The library exports some function using a C style convention from various modules. My test application can happily call some of the functions from some modules. There is one particular module, however, where every function segfaults. I've put a cout log message at the top of the function and this does not get hit. Looking at the coredump with dbx shows only that the fault is an illegal opcode 0x0. I've tried writing a test app that exports a function from a library and consumes it in an app which is fine. I've also tried writing a smaller test app which links in only the module containing the offending functions. In this case I can trigger the cout logging in the function. I have all optimisations switched off and the same compiler flags/versions for the app and the library.
It feels to me like the library is too large/exports too many functions and something is becoming corrupted/overflowing. I have no AIX experience so any pointers on whether this is likely or other avenues to persue for debugging this would be much appreciated.