FAQ
Here you can find answers to some of the most frequently asked questions about Morpher. If you have a question not answered on this page, you can ask it by email (see the Contact Us page).
- What does the term 'platform' stand for?
- Does Morpher support cross-compilation?
- How I can use Morpher to protect my own project?
- What input code source languages Morpher supports?
- Can I process only selected set of functions via Morpher?
- Can I link the object files generated by Morpher with objects files generated by my favorite compiler (e.g. Microsoft Visual Studio)?
- Are object files generated by Morpher binary compatible with ones compiled from C++ code by Microsoft Visual Studio? Can I intermix the C++ object files from Morpher and some other compiler (e.g. Microsoft Visual Studio)?
- Does Morpher support MS-style bitfield layout?
- Can I use Morpher to write dynamic link libraries (DLL) on Windows? Can I use DLLs with Morpher?
- Can I use Morpher in device driver projects for Windows?
What does the term 'platform' stand for?
Normally the term 'Platform' stands for the combination of the CPU architecture and the Operating System compiler generates code for. In many cases this is just a combination of the CPU architecture, executable file format and some extra desired features (e.g. on ARM one can have hardware support for floating point arithmetics and wants compiler to generate the appropriate code).
Examples of the platforms include:
- x86-32/darwin and x86-64/darwin (Darwin is a codename for Mac OS X)
- x86-32/windows
- x86-32/linux and x86-64/linux
- ppc32/darwin and ppc64/darwin
Does Morpher support cross-compilation?
In theory - yes. However, there might be different issues since Morpher includes a C/C++ compiler. Every C/C++ compiler cannot be shipped as-is, it should include the platform-dependent parts like C standard library, C++ STL support library, etc.
These parts are normally provided by the platform vendor and may have special licensing terms. The terms might disallow distribution of the libraries with 3-rd party compilers making cross-compilation not possible. Contact us for more information indicating the host and target platform - different variants are sometimes possible.
How I can use Morpher to protect my own project?
First of all you need to understand that Morpher is the compiler. That is why you cannot protect the binary alone, you always need the sources of the application you want to protect.
Next, Morpher is designed to be a drop-in replacement for the GCC compiler for given target platform. So, if your project is currently built with GCC, then everything you will need to use Morpher is just to change 'gcc' invocation to 'morphcc'.
If your project is built with some other compiler then sometimes there will be issues. The list of possible issues includes (bot not limited to):There are multiple ways of solving these problems. We can give some generic advices (additional porting support can be provided per request):
- You are using some vendor-specific language extensions in your sources
- Vendor compiler uses some internal object file format and does not support the object file format Morpher generates
- Vendor compiler uses some calling conventions / ABIs with which Morpher is not compatible with
- You can split your application into several parts, making the part which contains sensitive code to be a library without huge vendor-compiler dependencies
- Try to compile your project with GCC for your platform. If it works then almost surely it will work with Morpher
What input code source languages Morpher supports?
Morpher can be used with source code written in standard-compliant C (ANSI, C90, C99), C++, ObjectiveC, ObjectiveC++ (last two - on MacOS X only). Almost all GCC extensions are supported as well. Limited support for sources in Fortran95 and Ada can be provided per request.
Can I process only selected set of functions via Morpher?
Yes, there is extensible set of function attributes which can be used to override default options. For example, some functions can be marked to be always morphed, some - never morphed and default options to be used for the rest.
Can I link the object files generated by Morpher with objects files generated by my favorite compiler (e.g. Microsoft Visual Studio)?
Morpher tends to use the standard object file format for each platform it generates code to (e.g. ELF on Linux, PE-COFF on Windows, Mach-O on Darwin). And yes - object files generated by Morpher can be mixed with objects, generated by Microsoft Visual Studio.
Are object files generated by Morpher binary compatible with ones compiled from C++ code by Microsoft Visual Studio? Can I intermix the C++ object files from Morpher and some other compiler (e.g. Microsoft Visual Studio)?
Unfortunately, no. Morpher follows C++ Itanium ABI, which Visual Studio does not follow. Almost all internal C++ implementation details (name mangling, virtual table layout, etc.) in Visual Studio compilers are undocumented. Binaries derived from C sources are fully binary compatible though. Contact us for more information on this subject - different workarounds are available.
Does Morpher support MS-style bitfield layout?
Yes, Morpher fully supports both MS-style (little-endian) and GNU-style (big-endian) bitfield layout.
Can I use Morpher to write dynamic link libraries (DLL) on Windows? Can I use DLLs with Morpher?
Yes. Morpher fully supports dllimport / dllexport declspecs.
Can I use Morpher in device driver projects for Windows?
Morpher contains some limited set of DDK headers. Basically you will obtain superset of Win2000 DDK functionality.

