|
@@ -25,7 +25,9 @@ OBJTOOL_IN := $(OBJTOOL)-in.o
|
|
|
|
|
|
all: $(OBJTOOL)
|
|
all: $(OBJTOOL)
|
|
|
|
|
|
-INCLUDES := -I$(srctree)/tools/include -I$(srctree)/tools/arch/$(HOSTARCH)/include/uapi
|
|
|
|
|
|
+INCLUDES := -I$(srctree)/tools/include \
|
|
|
|
+ -I$(srctree)/tools/arch/$(HOSTARCH)/include/uapi \
|
|
|
|
+ -I$(srctree)/tools/objtool/arch/$(HOSTARCH)/include
|
|
WARNINGS := $(EXTRA_WARNINGS) -Wno-switch-default -Wno-switch-enum -Wno-packed
|
|
WARNINGS := $(EXTRA_WARNINGS) -Wno-switch-default -Wno-switch-enum -Wno-packed
|
|
CFLAGS += -Wall -Werror $(WARNINGS) -fomit-frame-pointer -O2 -g $(INCLUDES)
|
|
CFLAGS += -Wall -Werror $(WARNINGS) -fomit-frame-pointer -O2 -g $(INCLUDES)
|
|
LDFLAGS += -lelf $(LIBSUBCMD)
|
|
LDFLAGS += -lelf $(LIBSUBCMD)
|
|
@@ -46,16 +48,16 @@ $(OBJTOOL_IN): fixdep FORCE
|
|
$(OBJTOOL): $(LIBSUBCMD) $(OBJTOOL_IN)
|
|
$(OBJTOOL): $(LIBSUBCMD) $(OBJTOOL_IN)
|
|
@(diff -I 2>&1 | grep -q 'option requires an argument' && \
|
|
@(diff -I 2>&1 | grep -q 'option requires an argument' && \
|
|
test -d ../../kernel -a -d ../../tools -a -d ../objtool && (( \
|
|
test -d ../../kernel -a -d ../../tools -a -d ../objtool && (( \
|
|
- diff -I'^#include' arch/x86/insn/insn.c ../../arch/x86/lib/insn.c >/dev/null && \
|
|
|
|
- diff -I'^#include' arch/x86/insn/inat.c ../../arch/x86/lib/inat.c >/dev/null && \
|
|
|
|
- diff arch/x86/insn/x86-opcode-map.txt ../../arch/x86/lib/x86-opcode-map.txt >/dev/null && \
|
|
|
|
- diff arch/x86/insn/gen-insn-attr-x86.awk ../../arch/x86/tools/gen-insn-attr-x86.awk >/dev/null && \
|
|
|
|
- diff -I'^#include' arch/x86/insn/insn.h ../../arch/x86/include/asm/insn.h >/dev/null && \
|
|
|
|
- diff -I'^#include' arch/x86/insn/inat.h ../../arch/x86/include/asm/inat.h >/dev/null && \
|
|
|
|
- diff -I'^#include' arch/x86/insn/inat_types.h ../../arch/x86/include/asm/inat_types.h >/dev/null) \
|
|
|
|
|
|
+ diff arch/x86/lib/insn.c ../../arch/x86/lib/insn.c >/dev/null && \
|
|
|
|
+ diff arch/x86/lib/inat.c ../../arch/x86/lib/inat.c >/dev/null && \
|
|
|
|
+ diff arch/x86/lib/x86-opcode-map.txt ../../arch/x86/lib/x86-opcode-map.txt >/dev/null && \
|
|
|
|
+ diff arch/x86/tools/gen-insn-attr-x86.awk ../../arch/x86/tools/gen-insn-attr-x86.awk >/dev/null && \
|
|
|
|
+ diff arch/x86/include/asm/insn.h ../../arch/x86/include/asm/insn.h >/dev/null && \
|
|
|
|
+ diff arch/x86/include/asm/inat.h ../../arch/x86/include/asm/inat.h >/dev/null && \
|
|
|
|
+ diff arch/x86/include/asm/inat_types.h ../../arch/x86/include/asm/inat_types.h >/dev/null) \
|
|
|| echo "warning: objtool: x86 instruction decoder differs from kernel" >&2 )) || true
|
|
|| echo "warning: objtool: x86 instruction decoder differs from kernel" >&2 )) || true
|
|
@(test -d ../../kernel -a -d ../../tools -a -d ../objtool && (( \
|
|
@(test -d ../../kernel -a -d ../../tools -a -d ../objtool && (( \
|
|
- diff ../../arch/x86/include/asm/orc_types.h orc_types.h >/dev/null) \
|
|
|
|
|
|
+ diff ../../arch/x86/include/asm/orc_types.h arch/x86/include/asm/orc_types.h >/dev/null) \
|
|
|| echo "warning: objtool: orc_types.h differs from kernel" >&2 )) || true
|
|
|| echo "warning: objtool: orc_types.h differs from kernel" >&2 )) || true
|
|
$(QUIET_LINK)$(CC) $(OBJTOOL_IN) $(LDFLAGS) -o $@
|
|
$(QUIET_LINK)$(CC) $(OBJTOOL_IN) $(LDFLAGS) -o $@
|
|
|
|
|
|
@@ -66,7 +68,7 @@ $(LIBSUBCMD): fixdep FORCE
|
|
clean:
|
|
clean:
|
|
$(call QUIET_CLEAN, objtool) $(RM) $(OBJTOOL)
|
|
$(call QUIET_CLEAN, objtool) $(RM) $(OBJTOOL)
|
|
$(Q)find $(OUTPUT) -name '*.o' -delete -o -name '\.*.cmd' -delete -o -name '\.*.d' -delete
|
|
$(Q)find $(OUTPUT) -name '*.o' -delete -o -name '\.*.cmd' -delete -o -name '\.*.d' -delete
|
|
- $(Q)$(RM) $(OUTPUT)arch/x86/insn/inat-tables.c $(OUTPUT)fixdep
|
|
|
|
|
|
+ $(Q)$(RM) $(OUTPUT)arch/x86/lib/inat-tables.c $(OUTPUT)fixdep
|
|
|
|
|
|
FORCE:
|
|
FORCE:
|
|
|
|
|