Skip to content

Commit

Permalink
ARM: 6338/1: module - simplify code with temporaries
Browse files Browse the repository at this point in the history
Less to read.

Signed-off-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Phil Carmody authored and Russell King committed Sep 2, 2010
1 parent d4348c6 commit 5793432
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions arch/arm/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,19 @@ int module_frob_arch_sections(Elf_Ehdr *hdr,
Elf_Shdr *s, *sechdrs_end = sechdrs + hdr->e_shnum;

for (s = sechdrs; s < sechdrs_end; s++) {
if (strcmp(".ARM.exidx.init.text", secstrings + s->sh_name) == 0)
char const *secname = secstrings + s->sh_name;

if (strcmp(".ARM.exidx.init.text", secname) == 0)
mod->arch.unw_sec_init = s;
else if (strcmp(".ARM.exidx.devinit.text", secstrings + s->sh_name) == 0)
else if (strcmp(".ARM.exidx.devinit.text", secname) == 0)
mod->arch.unw_sec_devinit = s;
else if (strcmp(".ARM.exidx", secstrings + s->sh_name) == 0)
else if (strcmp(".ARM.exidx", secname) == 0)
mod->arch.unw_sec_core = s;
else if (strcmp(".init.text", secstrings + s->sh_name) == 0)
else if (strcmp(".init.text", secname) == 0)
mod->arch.sec_init_text = s;
else if (strcmp(".devinit.text", secstrings + s->sh_name) == 0)
else if (strcmp(".devinit.text", secname) == 0)
mod->arch.sec_devinit_text = s;
else if (strcmp(".text", secstrings + s->sh_name) == 0)
else if (strcmp(".text", secname) == 0)
mod->arch.sec_core_text = s;
}
#endif
Expand Down

0 comments on commit 5793432

Please sign in to comment.