Changes

132 bytes removed ,  21:11, 8 December 2016
→‎Using libcompel.a library: fix according to the latest git
Line 46: Line 46:  
Currently there is only one way to load the blob into victim task using libcompel.a, called ''c-header'' <ref>This is done for historical reasons, it was the most handy way to load [[parasite code]] by CRIU. In plans we have loading the .po ELF file itself</ref>. First you should make a header out of you .po file with the <code>hgen</code> action of compel tool:
 
Currently there is only one way to load the blob into victim task using libcompel.a, called ''c-header'' <ref>This is done for historical reasons, it was the most handy way to load [[parasite code]] by CRIU. In plans we have loading the .po ELF file itself</ref>. First you should make a header out of you .po file with the <code>hgen</code> action of compel tool:
   −
  compel hgen -f parasite.po -v parasite_relocs -p parasite_sym -s parasite_blob -r parasite_nr_gotpcrel -u compel/include/uapi/ -o parasite.h
+
  compel hgen -f parasite.po -p parasite -o parasite.h
   −
Here the <code>-f</code> option tells which binary to turn into header, and <code>-o</code> option tells where to put the resulting header. The rest of the arguments are used to fill in the blob descriptor, see the [[#Infecting]] section below for details.
+
Options meaning is the following:
 +
* <code>-f</code> tells which binary to turn into header
 +
* <code>-o</code> tells where to write the resulting header
 +
* <code>-p</code> tells the prefix to use for generated names
    
Once <code>parasite.h</code> file is ready, it should be included into the infecting program source code to be compiled with it.
 
Once <code>parasite.h</code> file is ready, it should be included into the infecting program source code to be compiled with it.