[PATCH v2 5/8] makedumpfile: Read and process filter commands from config file.

Ken'ichi Ohmichi oomichi at mxs.nes.nec.co.jp
Thu Aug 11 01:17:51 EDT 2011


Hi Mahesh,

On Thu, 11 Aug 2011 11:07:16 +0900
"Ken'ichi Ohmichi" <oomichi at mxs.nes.nec.co.jp> wrote:
> 
> BTW makedumpfile.c has become a large file which is bigger than 10KLine,
> and I will separate it to some files for the maintenance.

To shrink makedumpfile.c file, I made a prototype patch.
(commit 40f5724152047a12e4ac9db51d9f9e00e7a79ebe of filter-out-devel branch)
And I'd like to see your opinion.

You added sym_in_module() call into get_symbol_addr() to look for module
symbol. And I will move the call to resolve_config_entry() because I guess
sym_in_module() is used only for resolve_config_entry():

@@ -8448,13 +7326,21 @@ resolve_config_entry(struct config_entry *ce, unsigned long long base_addr,
                                                char *base_struct_name)
 {
        char buf[BUFSIZE + 1];
+       unsigned long long symbol;

        if (ce->flag & SYMBOL_ENTRY) {
                /* find the symbol info */
                if (!ce->name)
                        return FALSE;

-               ce->sym_addr = get_symbol_addr(ce->name);
+               /*
+                * If we are looking for module symbol then traverse through
+                * mod_st.modules for symbol lookup
+                */
+               if (sym_in_module(ce->name, &symbol))
+                       ce->sym_addr = symbol;
+               else
+                       ce->sym_addr = get_symbol_addr(ce->name);
                if (!ce->sym_addr) {
                        ERRMSG("Config error at %d: Can't find symbol '%s'.\n",
                                                        ce->line, ce->name);
---



Thanks
Ken'ichi Ohmichi



More information about the kexec mailing list