mirror of
https://github.com/dynup/kpatch
synced 2025-01-18 02:50:49 +00:00
insn: get it to compile in create-diff-object
This commit is contained in:
parent
ecc5141676
commit
cba7fd1f49
@ -1,14 +1,16 @@
|
|||||||
include ../Makefile.inc
|
include ../Makefile.inc
|
||||||
|
|
||||||
CFLAGS += -I../kmod/patch -Wall -g
|
CFLAGS += -I../kmod/patch -Iinsn -Wall -g
|
||||||
LDFLAGS = -lelf
|
LDFLAGS = -lelf
|
||||||
|
|
||||||
TARGETS = create-diff-object
|
TARGETS = create-diff-object
|
||||||
|
|
||||||
all: $(TARGETS)
|
all: $(TARGETS)
|
||||||
|
|
||||||
create-diff-object: create-diff-object.c list.h lookup.c lookup.h
|
create-diff-object: create-diff-object.c list.h lookup.c lookup.h insn/insn.c \
|
||||||
$(CC) $(CFLAGS) create-diff-object.c lookup.c -o $@ $(LDFLAGS)
|
insn/inat.c insn/inat-tables.c insn/asm/inat.h \
|
||||||
|
insn/asm/insn.h insn/asm/inat_types.h
|
||||||
|
$(CC) $(CFLAGS) create-diff-object.c lookup.c insn/insn.c insn/inat.c -o $@ $(LDFLAGS)
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
$(INSTALL) -d $(LIBEXECDIR)
|
$(INSTALL) -d $(LIBEXECDIR)
|
||||||
|
@ -26,6 +26,8 @@
|
|||||||
#include <asm/inat.h>
|
#include <asm/inat.h>
|
||||||
#include <asm/insn.h>
|
#include <asm/insn.h>
|
||||||
|
|
||||||
|
#define unlikely(a) a
|
||||||
|
|
||||||
/* Verify next sizeof(t) bytes can be on the same instruction */
|
/* Verify next sizeof(t) bytes can be on the same instruction */
|
||||||
#define validate_next(t, insn, n) \
|
#define validate_next(t, insn, n) \
|
||||||
((insn)->next_byte + sizeof(t) + n - (insn)->kaddr <= MAX_INSN_SIZE)
|
((insn)->next_byte + sizeof(t) + n - (insn)->kaddr <= MAX_INSN_SIZE)
|
||||||
|
Loading…
Reference in New Issue
Block a user