summaryrefslogtreecommitdiffstats
path: root/arch/x86/tools/Makefile
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2013-04-16 16:02:58 -0700
committerH. Peter Anvin <hpa@linux.intel.com>2013-04-16 16:02:58 -0700
commitc889ba801dc3b3a0155fa77d567f2c3a6097de1c (patch)
tree257878e1eb565fc9765dd8fed20815f7781d116a /arch/x86/tools/Makefile
parent17c961f7702ff6037b66bb2e5f3ddd58de4ce7e5 (diff)
downloadop-kernel-dev-c889ba801dc3b3a0155fa77d567f2c3a6097de1c.zip
op-kernel-dev-c889ba801dc3b3a0155fa77d567f2c3a6097de1c.tar.gz
x86, relocs: Refactor the relocs tool to merge 32- and 64-bit ELF
Refactor the relocs tool so that the same tool can handle 32- and 64-bit ELF. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com> Cc: Kees Cook <keescook@chromium.org> Link: http://lkml.kernel.org/r/1365797627-20874-5-git-send-email-keescook@chromium.org
Diffstat (limited to 'arch/x86/tools/Makefile')
-rw-r--r--arch/x86/tools/Makefile21
1 files changed, 3 insertions, 18 deletions
diff --git a/arch/x86/tools/Makefile b/arch/x86/tools/Makefile
index a8cb70c..e812034 100644
--- a/arch/x86/tools/Makefile
+++ b/arch/x86/tools/Makefile
@@ -37,22 +37,7 @@ $(obj)/test_get_len.o: $(srctree)/arch/x86/lib/insn.c $(srctree)/arch/x86/lib/in
$(obj)/insn_sanity.o: $(srctree)/arch/x86/lib/insn.c $(srctree)/arch/x86/lib/inat.c $(srctree)/arch/x86/include/asm/inat_types.h $(srctree)/arch/x86/include/asm/inat.h $(srctree)/arch/x86/include/asm/insn.h $(objtree)/arch/x86/lib/inat-tables.c
-HOSTCFLAGS_relocs_32.o += -DELF_BITS=32
-HOSTCFLAGS_relocs_64.o += -DELF_BITS=64
-
-quiet_cmd_cp_reloc = GEN $@
- cmd_cp_reloc = cp $< $@
-
-$(obj)/relocs_%.c: $(srctree)/arch/x86/tools/relocs.c
- $(call cmd,cp_reloc)
-
HOST_EXTRACFLAGS += -I$(srctree)/tools/include
-hostprogs-y += relocs_$(BITS)
-relocs_binaries = relocs_$(BITS)
-ifeq ($(CONFIG_64BIT),y)
- hostprogs-y += relocs_32
- relocs_binaries += relocs_32
-endif
-relocs: $(relocs_binaries)
-relocs_32: $(obj)/relocs_32
-relocs_64: $(obj)/relocs_64
+hostprogs-y += relocs
+relocs-objs := relocs_32.o relocs_64.o relocs_common.o
+relocs: $(obj)/relocs
OpenPOWER on IntegriCloud