2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-09-02 23:35:21 +00:00

x86: Teach syscall table generating script accept argument

We'll have to generate syscall table in another form,
prepare for it
.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Pavel Emelyanov
2012-12-17 22:47:17 +03:00
parent d7259d863f
commit bb2d78b0b7
2 changed files with 32 additions and 25 deletions

View File

@@ -17,7 +17,7 @@ CFLAGS += -c -fpie -Wstrict-prototypes -Wa,--noexecstack -D__ASSEMBLY__ -nostdl
$(SYS-ASM): $(SYS-GEN) $(SYS-DEF) $(SYS-ASM-COMMON) $(SYS-TYPES) $(SYS-ASM): $(SYS-GEN) $(SYS-DEF) $(SYS-ASM-COMMON) $(SYS-TYPES)
$(E) " GEN " $@ $(E) " GEN " $@
$(Q) $(SH) \ $(Q) $(SH) \
$(SYS-GEN) \ $(SYS-GEN) --asm \
$(SYS-DEF) \ $(SYS-DEF) \
$(SYS-CODES) \ $(SYS-CODES) \
$(SYS-PROTO) \ $(SYS-PROTO) \

View File

@@ -1,5 +1,6 @@
#!/bin/sh #!/bin/sh
function gen_asm() {
in=$1 in=$1
codesout=$2 codesout=$2
protosout=$3 protosout=$3
@@ -30,3 +31,9 @@ cat $in | egrep -v '^#' | sed -e 's/\t\{1,\}/|/g' | awk -F '|' '{print "SYSCALL(
echo "#endif /* $codesdef */" >> $codesout echo "#endif /* $codesdef */" >> $codesout
echo "#endif /* $protosdef */" >> $protosout echo "#endif /* $protosdef */" >> $protosout
}
if [ "$1" = "--asm" ]; then
shift
gen_asm $@
fi