Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 347102
b: refs/heads/master
c: 54523ec
h: refs/heads/master
v: v3
  • Loading branch information
Satoru Takeuchi authored and Rusty Russell committed Dec 14, 2012
1 parent bb3fb31 commit ecd4b2b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 99cca91e370ab9224755365dda98b78eb5a5417f
refs/heads/master: 54523ec71f8ce99accae97c74152f14f261f7e18
6 changes: 1 addition & 5 deletions trunk/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -2285,7 +2285,7 @@ static void layout_symtab(struct module *mod, struct load_info *info)
Elf_Shdr *symsect = info->sechdrs + info->index.sym;
Elf_Shdr *strsect = info->sechdrs + info->index.str;
const Elf_Sym *src;
unsigned int i, nsrc, ndst, strtab_size;
unsigned int i, nsrc, ndst, strtab_size = 0;

/* Put symbol section at end of init part of module. */
symsect->sh_flags |= SHF_ALLOC;
Expand All @@ -2296,9 +2296,6 @@ static void layout_symtab(struct module *mod, struct load_info *info)
src = (void *)info->hdr + symsect->sh_offset;
nsrc = symsect->sh_size / sizeof(*src);

/* strtab always starts with a nul, so offset 0 is the empty string. */
strtab_size = 1;

/* Compute total space required for the core symbols' strtab. */
for (ndst = i = 0; i < nsrc; i++) {
if (i == 0 ||
Expand Down Expand Up @@ -2340,7 +2337,6 @@ static void add_kallsyms(struct module *mod, const struct load_info *info)
mod->core_symtab = dst = mod->module_core + info->symoffs;
mod->core_strtab = s = mod->module_core + info->stroffs;
src = mod->symtab;
*s++ = 0;
for (ndst = i = 0; i < mod->num_symtab; i++) {
if (i == 0 ||
is_core_symbol(src+i, info->sechdrs, info->hdr->e_shnum)) {
Expand Down

0 comments on commit ecd4b2b

Please sign in to comment.