|
@@ -2427,7 +2427,7 @@ static void write_if_changed(struct buffer *b, const char *fname)
|
|
}
|
|
}
|
|
|
|
|
|
/* parse Module.symvers file. line format:
|
|
/* parse Module.symvers file. line format:
|
|
- * 0x12345678<tab>symbol<tab>module[[<tab>export]<tab>something]
|
|
|
|
|
|
+ * 0x12345678<tab>symbol<tab>module<tab>export<tab>namespace
|
|
**/
|
|
**/
|
|
static void read_dump(const char *fname, unsigned int kernel)
|
|
static void read_dump(const char *fname, unsigned int kernel)
|
|
{
|
|
{
|
|
@@ -2440,7 +2440,7 @@ static void read_dump(const char *fname, unsigned int kernel)
|
|
return;
|
|
return;
|
|
|
|
|
|
while ((line = get_next_line(&pos, file, size))) {
|
|
while ((line = get_next_line(&pos, file, size))) {
|
|
- char *symname, *namespace, *modname, *d, *export, *end;
|
|
|
|
|
|
+ char *symname, *namespace, *modname, *d, *export;
|
|
unsigned int crc;
|
|
unsigned int crc;
|
|
struct module *mod;
|
|
struct module *mod;
|
|
struct symbol *s;
|
|
struct symbol *s;
|
|
@@ -2448,16 +2448,16 @@ static void read_dump(const char *fname, unsigned int kernel)
|
|
if (!(symname = strchr(line, '\t')))
|
|
if (!(symname = strchr(line, '\t')))
|
|
goto fail;
|
|
goto fail;
|
|
*symname++ = '\0';
|
|
*symname++ = '\0';
|
|
- if (!(namespace = strchr(symname, '\t')))
|
|
|
|
- goto fail;
|
|
|
|
- *namespace++ = '\0';
|
|
|
|
- if (!(modname = strchr(namespace, '\t')))
|
|
|
|
|
|
+ if (!(modname = strchr(symname, '\t')))
|
|
goto fail;
|
|
goto fail;
|
|
*modname++ = '\0';
|
|
*modname++ = '\0';
|
|
- if ((export = strchr(modname, '\t')) != NULL)
|
|
|
|
- *export++ = '\0';
|
|
|
|
- if (export && ((end = strchr(export, '\t')) != NULL))
|
|
|
|
- *end = '\0';
|
|
|
|
|
|
+ if (!(export = strchr(modname, '\t')))
|
|
|
|
+ goto fail;
|
|
|
|
+ *export++ = '\0';
|
|
|
|
+ if (!(namespace = strchr(export, '\t')))
|
|
|
|
+ goto fail;
|
|
|
|
+ *namespace++ = '\0';
|
|
|
|
+
|
|
crc = strtoul(line, &d, 16);
|
|
crc = strtoul(line, &d, 16);
|
|
if (*symname == '\0' || *modname == '\0' || *d != '\0')
|
|
if (*symname == '\0' || *modname == '\0' || *d != '\0')
|
|
goto fail;
|
|
goto fail;
|
|
@@ -2508,9 +2508,9 @@ static void write_dump(const char *fname)
|
|
namespace = symbol->namespace;
|
|
namespace = symbol->namespace;
|
|
buf_printf(&buf, "0x%08x\t%s\t%s\t%s\t%s\n",
|
|
buf_printf(&buf, "0x%08x\t%s\t%s\t%s\t%s\n",
|
|
symbol->crc, symbol->name,
|
|
symbol->crc, symbol->name,
|
|
- namespace ? namespace : "",
|
|
|
|
symbol->module->name,
|
|
symbol->module->name,
|
|
- export_str(symbol->export));
|
|
|
|
|
|
+ export_str(symbol->export),
|
|
|
|
+ namespace ? namespace : "");
|
|
}
|
|
}
|
|
symbol = symbol->next;
|
|
symbol = symbol->next;
|
|
}
|
|
}
|