compel: Initial drainings from CRIU done by Cyrill

This stuff is copy-paste-rework-ed from CRIU to acheive the
parasitic code execution functionality as library, plugins
and CLI tool.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
compel: Big rework of compel and tests

This patch includes a lot of stuff and is effectively 'initial
commit #2'. So, we have here

1. licensing
2. readme
3. tests
4. rework of args passing
5. fds and shmem plugins
6. cleanups and dead code removals
7. CLI tuning
8. docs fixup according to the above

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
test: Add shmem test into the list

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
test: Link only required plugins for tests

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
todo: Updated with short-term plans

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
libcompel: Drop include/asm/elf.h

It's redundant.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
libcompel: Elf -- split load_elf_plugin into helpers

This routine will be needed for packed blobs verification
but without relocations applied and init symbols fixed up.

So split it into a several helpers and reuse code later.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
libcompel: Add libcompel_verify_packed helper

This routine takes packed compel object file and verifies
that it's suitable for run action. In particualr we do
check that all symbols used in the object are resolved.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
compel: Verify packed compel file

If a user forgot to include some plugin into pack,
notify him early.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
test: Makefile -- Add well known Q and E macros

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
test: Add undef_fds test

To verfiy pack action yields error on missed symbols.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
fds: Remove code that fetched fds data

The plan is to attach data via callbacks, this code
is not required in compel.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
cflags: Put pie gcc flags into one place

Plugins and the parasite obj file should be built with
special set of flags. Keep them all in one place.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
compel: Fix help message

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>