mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 02:14:37 +00:00
This commit adds a `--preload-libfault` option to ZDTM's run command. This option runs CRIU with LD_PRELOAD to intercept libc functions such as pread(). This method allows to simulate special cases, for example, when a successful call to pread() transfers fewer bytes than requested. Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
21 lines
238 B
Makefile
21 lines
238 B
Makefile
CC = gcc
|
|
CFLAGS = -c -fPIC -ldl
|
|
|
|
SRC = libfault.c
|
|
OBJ = $(SRC:.c=.o)
|
|
|
|
LIB = libfault.so
|
|
|
|
.PHONY: all clean run
|
|
|
|
all: $(LIB)
|
|
|
|
$(LIB): $(OBJ)
|
|
$(CC) -shared -o $(LIB) $(OBJ)
|
|
|
|
$(OBJ): $(SRC)
|
|
$(CC) $(CFLAGS) $<
|
|
|
|
clean:
|
|
rm -f $(OBJ) $(LIB)
|
|
|