summaryrefslogtreecommitdiff
path: root/kexec/arch/i386/crashdump-x86.c
diff options
context:
space:
mode:
Diffstat (limited to 'kexec/arch/i386/crashdump-x86.c')
-rw-r--r--kexec/arch/i386/crashdump-x86.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/kexec/arch/i386/crashdump-x86.c b/kexec/arch/i386/crashdump-x86.c
index 285dea9..69a063a 100644
--- a/kexec/arch/i386/crashdump-x86.c
+++ b/kexec/arch/i386/crashdump-x86.c
@@ -102,35 +102,6 @@ static int get_kernel_paddr(struct kexec_info *UNUSED(info),
return -1;
}
-/* Retrieve kernel symbol virtual address from /proc/kallsyms */
-static unsigned long long get_kernel_sym(const char *symbol)
-{
- const char *kallsyms = "/proc/kallsyms";
- char sym[128];
- char line[128];
- FILE *fp;
- unsigned long long vaddr;
- char type;
-
- fp = fopen(kallsyms, "r");
- if (!fp) {
- fprintf(stderr, "Cannot open %s\n", kallsyms);
- return 0;
- }
-
- while(fgets(line, sizeof(line), fp) != NULL) {
- if (sscanf(line, "%llx %c %s", &vaddr, &type, sym) != 3)
- continue;
- if (strcmp(sym, symbol) == 0) {
- dbgprintf("kernel symbol %s vaddr = %16llx\n", symbol, vaddr);
- return vaddr;
- }
- }
-
- dbgprintf("Cannot get kernel %s symbol address\n", symbol);
- return 0;
-}
-
/* Retrieve info regarding virtual address kernel has been compiled for and
* size of the kernel from /proc/kcore. Current /proc/kcore parsing from
* from kexec-tools fails because of malformed elf notes. A kernel patch has