diff options
author | Phil Carmody <ext-phil.2.carmody@nokia.com> | 2010-08-19 10:10:24 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-09-02 10:31:34 -0400 |
commit | 5793432628ad76f93ae4d31c23fb1c26e3d8b525 (patch) | |
tree | 9fcf2b526fa04a2c512459092e4229bc70a8ef18 | |
parent | d4348c678977c7093438bbbf2067c49396ae941b (diff) |
ARM: 6338/1: module - simplify code with temporaries
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>
-rw-r--r-- | arch/arm/kernel/module.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c index 6b4605893f1e..1dae0468677a 100644 --- a/arch/arm/kernel/module.c +++ b/arch/arm/kernel/module.c | |||
@@ -71,17 +71,19 @@ int module_frob_arch_sections(Elf_Ehdr *hdr, | |||
71 | Elf_Shdr *s, *sechdrs_end = sechdrs + hdr->e_shnum; | 71 | Elf_Shdr *s, *sechdrs_end = sechdrs + hdr->e_shnum; |
72 | 72 | ||
73 | for (s = sechdrs; s < sechdrs_end; s++) { | 73 | for (s = sechdrs; s < sechdrs_end; s++) { |
74 | if (strcmp(".ARM.exidx.init.text", secstrings + s->sh_name) == 0) | 74 | char const *secname = secstrings + s->sh_name; |
75 | |||
76 | if (strcmp(".ARM.exidx.init.text", secname) == 0) | ||
75 | mod->arch.unw_sec_init = s; | 77 | mod->arch.unw_sec_init = s; |
76 | else if (strcmp(".ARM.exidx.devinit.text", secstrings + s->sh_name) == 0) | 78 | else if (strcmp(".ARM.exidx.devinit.text", secname) == 0) |
77 | mod->arch.unw_sec_devinit = s; | 79 | mod->arch.unw_sec_devinit = s; |
78 | else if (strcmp(".ARM.exidx", secstrings + s->sh_name) == 0) | 80 | else if (strcmp(".ARM.exidx", secname) == 0) |
79 | mod->arch.unw_sec_core = s; | 81 | mod->arch.unw_sec_core = s; |
80 | else if (strcmp(".init.text", secstrings + s->sh_name) == 0) | 82 | else if (strcmp(".init.text", secname) == 0) |
81 | mod->arch.sec_init_text = s; | 83 | mod->arch.sec_init_text = s; |
82 | else if (strcmp(".devinit.text", secstrings + s->sh_name) == 0) | 84 | else if (strcmp(".devinit.text", secname) == 0) |
83 | mod->arch.sec_devinit_text = s; | 85 | mod->arch.sec_devinit_text = s; |
84 | else if (strcmp(".text", secstrings + s->sh_name) == 0) | 86 | else if (strcmp(".text", secname) == 0) |
85 | mod->arch.sec_core_text = s; | 87 | mod->arch.sec_core_text = s; |
86 | } | 88 | } |
87 | #endif | 89 | #endif |