AxProtector adds two additional segments to the application to be protected (protectee). For this, AxProtector must extend the program header.
AxProtector uses, if possible, free space in the binary. Space which is not used due to the alignment of subsequent segments. If the free space is not sufficient, a gap must be inserted into the protectee. Then AxProtector recognizes and uses this gap as a target for moving the program header.
The gap can be inserted using the macro ‘WIBU_PHDR_GAP‘ as part of the wibuixap.h header (located at .\usr\include\).
Currently, the macro is defined as follows:
#define WIBU_PHDR_GAP \
extern “C” __attribute__((section(“.text#”), aligned(0x10), visibility(“default”))) \
const unsigned char _phdr_rxfpmuiorgtc54re4398[0x1000] = \
{
0x57, 0x49, 0x42, 0x55, 0x50, 0x48, 0x44, 0x52, \
0x3b, 0x89, 0x78, 0xf5, 0xbc, 0xdd, 0x53, 0x66, \
0x6d, 0x86, 0x02, 0x70, 0xe1, 0xa8, 0x85, 0x6c, \
0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 \
};
The macro can be used in any *.c/*.cpp file. A header file should not be used.





