I know this is a very old stream, but I just want to share some of my discoveries. I redid some part of the executable file that NVCC generates. Therefore, I am not sure of the correctness and use at my own risk. I am using cuda 8.0 RC, so I'm not sure that other versions have not changed anything.
__cuRegisterFatBinary accepts void * input. It points to an executable file, and in my example I got the following.
B1 43 62 46 01 00 00 00 70 15 40 00 00 00 00 00 00 00 00 00 00 00 00 00
Hex sequence follows format
struct { uint32_t magic;
So, if you follow the address in the ptr field, you can find a real bold binary file that follows the definition you can find in fatbinary.h in the cuda include directory. There is header information. If you are looking for the next occurrence of 0x7F + 'ELF' (elf magic), you can extract the Cuban file there.
source share