mirror of https://github.com/dynup/kpatch
kpatch-build: Build with insn support only on x86_64
kpatch-build/insn provides x86 instruction analysis, disable the analyzer support when build on powerpc. Cc: Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
This commit is contained in:
parent
a0adebf861
commit
dde4e95fa4
|
@ -7,7 +7,13 @@ TARGETS = create-diff-object create-klp-module create-kpatch-module
|
|||
SOURCES = create-diff-object.c kpatch-elf.c \
|
||||
create-klp-module.c \
|
||||
create-kpatch-module.c \
|
||||
lookup.c insn/insn.c insn/inat.c
|
||||
create-kpatch-module.c lookup.c
|
||||
|
||||
ifeq ($(ARCH),x86_64)
|
||||
SOURCES += insn/insn.c insn/inat.c
|
||||
INSN = insn/insn.o insn/inat.o
|
||||
endif
|
||||
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
|
@ -17,7 +23,7 @@ all: $(TARGETS)
|
|||
$(CC) -MMD -MP $(CFLAGS) -c -o $@ $<
|
||||
|
||||
create-diff-object: create-diff-object.o kpatch-elf.o \
|
||||
lookup.o insn/insn.o insn/inat.o
|
||||
lookup.o $(INSN)
|
||||
create-klp-module: create-klp-module.o kpatch-elf.o
|
||||
create-kpatch-module: create-kpatch-module.o kpatch-elf.o
|
||||
|
||||
|
|
|
@ -225,6 +225,7 @@ out:
|
|||
log_debug("section %s has changed\n", sec->name);
|
||||
}
|
||||
|
||||
#ifdef __x86_64__
|
||||
/*
|
||||
* Determine if a section has changed only due to a WARN* or might_sleep
|
||||
* macro call's embedding of the line number into an instruction operand.
|
||||
|
@ -330,6 +331,12 @@ static int kpatch_line_macro_change_only(struct section *sec)
|
|||
|
||||
return 1;
|
||||
}
|
||||
#else
|
||||
static int kpatch_line_macro_change_only(struct section *sec)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void kpatch_compare_sections(struct list_head *seclist)
|
||||
{
|
||||
|
@ -868,6 +875,7 @@ static void kpatch_compare_correlated_elements(struct kpatch_elf *kelf)
|
|||
kpatch_compare_symbols(&kelf->symbols);
|
||||
}
|
||||
|
||||
#ifdef __x86_64__
|
||||
static void rela_insn(struct section *sec, struct rela *rela, struct insn *insn)
|
||||
{
|
||||
unsigned long insn_addr, start, end, rela_addr;
|
||||
|
@ -886,6 +894,9 @@ static void rela_insn(struct section *sec, struct rela *rela, struct insn *insn)
|
|||
return;
|
||||
}
|
||||
}
|
||||
#else
|
||||
static void rela_insn(struct section *sec, struct rela *rela, struct insn *insn) { }
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Mangle the relas a little. The compiler will sometimes use section symbols
|
||||
|
|
Loading…
Reference in New Issue