Hi.
This patch adds SYMBOL_INIT().
Thanks
Ken'ichi Ohmichi
diff -puN makedumpfile.org/makedumpfile.c makedumpfile/makedumpfile.c
--- makedumpfile.org/makedumpfile.c 2006-10-11 13:06:11.000000000 +0900
+++ makedumpfile/makedumpfile.c 2006-10-11 13:06:25.000000000 +0900
@@ -647,20 +647,20 @@ int
get_symbol_info(struct DumpInfo *info)
{
/*
- * Get symbol info from the System.map.
+ * Get symbol info.
*/
- SYMBOL(mem_map) = get_symbol_addr(info, "mem_map", 0);
- SYMBOL(mem_section) = get_symbol_addr(info, "mem_section", 0);
- SYMBOL(pkmap_count) = get_symbol_addr(info, "pkmap_count", 0);
- SYMBOL(pkmap_count_next) = get_symbol_addr(info, "pkmap_count", 1);
- SYMBOL(system_utsname) = get_symbol_addr(info, "system_utsname", 0);
- SYMBOL(_stext) = get_symbol_addr(info, "_stext", 0);
- SYMBOL(_text) = get_symbol_addr(info, "_text", 0);
- SYMBOL(phys_base) = get_symbol_addr(info, "phys_base", 0);
- SYMBOL(node_online_map) = get_symbol_addr(info, "node_online_map", 0);
- SYMBOL(node_data) = get_symbol_addr(info, "node_data", 0);
- SYMBOL(pgdat_list) = get_symbol_addr(info, "pgdat_list", 0);
- SYMBOL(contig_page_data) = get_symbol_addr(info, "contig_page_data", 0);
+ SYMBOL_INIT(mem_map, "mem_map");
+ SYMBOL_INIT(mem_section, "mem_section");
+ SYMBOL_INIT(pkmap_count, "pkmap_count");
+ SYMBOL_INIT_NEXT(pkmap_count_next, "pkmap_count");
+ SYMBOL_INIT(system_utsname, "system_utsname");
+ SYMBOL_INIT(_stext, "_stext");
+ SYMBOL_INIT(_text, "_text");
+ SYMBOL_INIT(phys_base, "phys_base");
+ SYMBOL_INIT(node_online_map, "node_online_map");
+ SYMBOL_INIT(node_data, "node_data");
+ SYMBOL_INIT(pgdat_list, "pgdat_list");
+ SYMBOL_INIT(contig_page_data, "contig_page_data");
return TRUE;
}
diff -puN makedumpfile.org/makedumpfile.h makedumpfile/makedumpfile.h
--- makedumpfile.org/makedumpfile.h 2006-10-11 13:06:11.000000000 +0900
+++ makedumpfile/makedumpfile.h 2006-10-11 13:06:25.000000000 +0900
@@ -178,6 +178,14 @@ isAnon(unsigned long mapping)
#define NOT_FOUND_SYMBOL (0)
#define INVALID_SYMBOL_DATA (ULONG_MAX)
#define SYMBOL(X) (symbol_table.X)
+#define SYMBOL_INIT(symbol, str_symbol) \
+do { \
+ SYMBOL(symbol) = get_symbol_addr(info, str_symbol, 0); \
+} while (0)
+#define SYMBOL_INIT_NEXT(symbol, str_symbol) \
+do { \
+ SYMBOL(symbol) = get_symbol_addr(info, str_symbol, 1); \
+} while (0)
#define WRITE_SYMBOL(str_symbol, symbol) \
do { \
if (SYMBOL(symbol) != NOT_FOUND_SYMBOL) { \
_
_______________________________________________
fastboot mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/fastboot