Skip to contentSkip to conversation

kdump: fix compiling error: undefined elfcorehdr_addr

PATCH New Li, Zhen-Hua 1 participant 1 message Sep 18, 2014 Kdump

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kdump: fix compiling error: undefined elfcorehdr_addr

While debugging the kdump kernel, I found there is a compiling error:
If is_kdump_kernel() is called in some driver(for example, add it in debugging code in module qla2xxx), there will be a compiling error:

ERROR: "elfcorehdr_addr" [drivers/scsi/qla2xxx/qla2xxx.ko] undefined!

Add EXPORT_SYMBOL for elfcorehdr_addr will fix this.

---
 kernel/crash_dump.c | 1 +
 1 file changed, 1 insertion(+)
kernel/crash_dump.c +1 -0
index c766ee5..8cb4838 100644
@@ -18,6 +18,7 @@ unsigned long saved_max_pfn;
  * it under CONFIG_CRASH_DUMP and not CONFIG_PROC_VMCORE.
  */
 unsigned long long elfcorehdr_addr = ELFCORE_ADDR_MAX;
+EXPORT_SYMBOL(elfcorehdr_addr);
 
 /*
  * stores the size of elf header of crash image
Signature · 1 line
2.0.0-rc0