From: HATAYAMA Daisuke <d.hatayama(a)jp.fujitsu.com>
Add linux_banner_vmlinux in symbol table, which we'll later use in
calc_kaslr_offset() to do a sanity check in calculation of
kaslr_offset and phys_base.
---
defs.h | 1 +
symbols.c | 10 ++++++++++
2 files changed, 11 insertions(+)
diff --git a/defs.h b/defs.h
index d7adb23..17e9876 100644
--- a/defs.h
+++ b/defs.h
@@ -2714,6 +2714,7 @@ struct symbol_table_data {
ulong pti_init_vmlinux;
ulong kaiser_init_vmlinux;
int kernel_symbol_type;
+ ulong linux_banner_vmlinux;
};
/* flags for st */
diff --git a/symbols.c b/symbols.c
index 3b1f08a..b9de4a1 100644
--- a/symbols.c
+++ b/symbols.c
@@ -3226,6 +3226,11 @@ dump_symbol_table(void)
fprintf(fp, " kaiser_init_vmlinux: (unused)\n");
}
+ if (SADUMP_DUMPFILE())
+ fprintf(fp, "linux_banner_vmlinux: %lx\n", st->linux_banner_vmlinux);
+ else
+ fprintf(fp, "linux_banner_vmlinux: (unused)\n");
+
fprintf(fp, " symval_hash[%d]: %lx\n", SYMVAL_HASH,
(ulong)&st->symval_hash[0]);
@@ -12687,6 +12692,11 @@ numeric_forward(const void *P_x, const void *P_y)
else if (STREQ(y->name, "idt_table"))
st->idt_table_vmlinux = valueof(y);
+ if (STREQ(x->name, "linux_banner"))
+ st->linux_banner_vmlinux = valueof(x);
+ else if (STREQ(y->name, "linux_banner"))
+ st->linux_banner_vmlinux = valueof(y);
+
if (STREQ(x->name, "saved_command_line"))
st->saved_command_line_vmlinux = valueof(x);
else if (STREQ(y->name, "saved_command_line"))
--
1.8.3.1