diff options
author | Vineet Gupta <vgupta@synopsys.com> | 2017-01-16 13:48:09 -0500 |
---|---|---|
committer | Vineet Gupta <vgupta@synopsys.com> | 2017-01-18 14:17:44 -0500 |
commit | eb1357d942e5d96de6b4c20a8ffa55acf96233a2 (patch) | |
tree | 623f34743d7fbfafb97dc8a6e7c9990f9a7f4ac3 /arch/arc/kernel/module.c | |
parent | ecd43afdbe72017aefe48080631eb625e177ef4d (diff) |
ARC: module: Fix !CONFIG_ARC_DW2_UNWIND builds
commit d65283f7b695b5 added mod->arch.secstr under
CONFIG_ARC_DW2_UNWIND, but used it unconditionally which broke builds
when the option was disabled. Fix that by adjusting the #ifdef guard.
And while at it add a missing guard (for unwinder) in module.c as well
Reported-by: Waldemar Brodkorb <wbx@openadk.org>
Cc: stable@vger.kernel.org #4.9
Fixes: d65283f7b695b5 ("ARC: module: elide loop to save reference to .eh_frame")
Tested-by: Anton Kolesov <akolesov@synopsys.com>
Reviewed-by: Alexey Brodkin <abrodkin@synopsys.com>
[abrodkin: provided fixlet to Kconfig per failure in allnoconfig build]
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc/kernel/module.c')
-rw-r--r-- | arch/arc/kernel/module.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/arc/kernel/module.c b/arch/arc/kernel/module.c index 42e964db2967..3d99a6091332 100644 --- a/arch/arc/kernel/module.c +++ b/arch/arc/kernel/module.c | |||
@@ -32,8 +32,8 @@ int module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, | |||
32 | #ifdef CONFIG_ARC_DW2_UNWIND | 32 | #ifdef CONFIG_ARC_DW2_UNWIND |
33 | mod->arch.unw_sec_idx = 0; | 33 | mod->arch.unw_sec_idx = 0; |
34 | mod->arch.unw_info = NULL; | 34 | mod->arch.unw_info = NULL; |
35 | mod->arch.secstr = secstr; | ||
36 | #endif | 35 | #endif |
36 | mod->arch.secstr = secstr; | ||
37 | return 0; | 37 | return 0; |
38 | } | 38 | } |
39 | 39 | ||
@@ -113,8 +113,10 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, | |||
113 | 113 | ||
114 | } | 114 | } |
115 | 115 | ||
116 | #ifdef CONFIG_ARC_DW2_UNWIND | ||
116 | if (strcmp(module->arch.secstr+sechdrs[tgtsec].sh_name, ".eh_frame") == 0) | 117 | if (strcmp(module->arch.secstr+sechdrs[tgtsec].sh_name, ".eh_frame") == 0) |
117 | module->arch.unw_sec_idx = tgtsec; | 118 | module->arch.unw_sec_idx = tgtsec; |
119 | #endif | ||
118 | 120 | ||
119 | return 0; | 121 | return 0; |
120 | 122 | ||