ia64: fix build error with !COREDUMP
authorKrzysztof Kozlowski <krzk@kernel.org>
Sat, 17 Oct 2020 23:13:37 +0000 (16:13 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Nov 2020 10:07:03 +0000 (11:07 +0100)
commit 7404840d87557c4092bf0272bce5e0354c774bf9 upstream.

Fix linkage error when CONFIG_BINFMT_ELF is selected but CONFIG_COREDUMP
is not:

    ia64-linux-ld: arch/ia64/kernel/elfcore.o: in function `elf_core_write_extra_phdrs':
    elfcore.c:(.text+0x172): undefined reference to `dump_emit'
    ia64-linux-ld: arch/ia64/kernel/elfcore.o: in function `elf_core_write_extra_data':
    elfcore.c:(.text+0x2b2): undefined reference to `dump_emit'

Fixes: 1fcccbac89f5 ("elf coredump: replace ELF_CORE_EXTRA_* macros by functions")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: <stable@vger.kernel.org>
Link: https://lkml.kernel.org/r/20200819064146.12529-1-krzk@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/ia64/kernel/Makefile

index 14ad79f394e50fa7071d0c15a5ff0c4e8f5103c7..0a4e32f94f6c89591c3e7205d31cea389803b4fb 100644 (file)
@@ -43,7 +43,7 @@ endif
 obj-$(CONFIG_INTEL_IOMMU)      += pci-dma.o
 obj-$(CONFIG_SWIOTLB)          += pci-swiotlb.o
 
-obj-$(CONFIG_BINFMT_ELF)       += elfcore.o
+obj-$(CONFIG_ELF_CORE)         += elfcore.o
 
 # fp_emulate() expects f2-f5,f16-f31 to contain the user-level state.
 CFLAGS_traps.o  += -mfixed-range=f2-f5,f16-f31