mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-26 11:35:33 +00:00
And use it in CRIU directly instead: - move syscalls into compel/arch/ARCH/plugins/std/syscalls - drop old symlinks - no build for 32bit on x86 as expected - use std.built-in.o inside criu directly (compel_main stub) - drop syscalls on x86 criu directory, I copied them already in first compel commist, so we can't move them now, but delete in place Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
43 lines
892 B
Perl
Executable file
43 lines
892 B
Perl
Executable file
#!/usr/bin/perl
|
|
|
|
use strict;
|
|
use warnings;
|
|
|
|
my $in = $ARGV[0];
|
|
my $tblout = $ARGV[1];
|
|
my $bits = $ARGV[2];
|
|
|
|
my $code = "code$bits";
|
|
|
|
open TBLOUT, ">", $tblout or die $!;
|
|
open IN, "<", $in or die $!;
|
|
|
|
print TBLOUT "/* Autogenerated, don't edit */\n";
|
|
print TBLOUT "static struct syscall_exec_desc sc_exec_table[] = {\n";
|
|
|
|
for (<IN>) {
|
|
if ($_ =~ /\#/) {
|
|
next;
|
|
}
|
|
|
|
my $sys_name;
|
|
my $sys_num;
|
|
|
|
if (/(?<name>\S+)\s+(?<alias>\S+)\s+(?<code64>\d+|\!)\s+(?<code32>(?:\d+|\!))\s+\((?<args>.+)\)/) {
|
|
$sys_name = $+{alias};
|
|
} elsif (/(?<name>\S+)\s+(?<code64>\d+|\!)\s+(?<code32>(?:\d+|\!))\s+\((?<args>.+)\)/) {
|
|
$sys_name = $+{name};
|
|
} else {
|
|
unlink $tblout;
|
|
die "Invalid syscall definition file: invalid entry $_\n";
|
|
}
|
|
|
|
$sys_num = $+{$code};
|
|
|
|
if ($sys_num ne "!") {
|
|
print TBLOUT "SYSCALL($sys_name, $sys_num)\n";
|
|
}
|
|
}
|
|
|
|
print TBLOUT " { }, /* terminator */";
|
|
print TBLOUT "};"
|