diff options
author | Vineet Gupta <vgupta@synopsys.com> | 2013-06-24 21:22:06 +0530 |
---|---|---|
committer | Vineet Gupta <vgupta@synopsys.com> | 2016-09-30 14:48:20 -0700 |
commit | 6716dbbdefa9867ba98dea91d89b14168043a48c (patch) | |
tree | d134bd3853996ec3ebae718a786ec9bfe365c8b1 /arch/arc/kernel/module.c | |
parent | d040876b4aad0c157c5c95779128b71a121ff27d (diff) | |
download | linux-next-6716dbbdefa9867ba98dea91d89b14168043a48c.tar.gz |
ARC: dw2 unwind: switch to .eh_frame based unwinding
So finally after almost 8 years of dealing with .debug_frame, we are
finally switching to .eh_frame. The reason being stripped kernel
binaries had non-functional unwinder as .debug_frame was gone.
Also, in general .eh_frame seems more common way of doing unwinding.
This also folds a revert of f52e126cc747 ("ARC: unwind: ensure that
.debug_frame is generated (vs. .eh_frame)") to ensure that we start
getting .eh_frame
Reported-by: Daniel Mentz <danielmentz@google.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc/kernel/module.c')
-rw-r--r-- | arch/arc/kernel/module.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/arch/arc/kernel/module.c b/arch/arc/kernel/module.c index 576a238434a1..9a2849756022 100644 --- a/arch/arc/kernel/module.c +++ b/arch/arc/kernel/module.c @@ -22,13 +22,9 @@ static inline void arc_write_me(unsigned short *addr, unsigned long value) *(addr + 1) = (value & 0xffff); } -/* ARC specific section quirks - before relocation loop in generic loader - * - * For dwarf unwinding out of modules, this needs to - * 1. Ensure the .debug_frame is allocatable (ARC Linker bug: despite - * -fasynchronous-unwind-tables it doesn't). - * 2. Since we are iterating thru sec hdr tbl anyways, make a note of - * the exact section index, for later use. +/* + * This gets called before relocation loop in generic loader + * Make a note of the section index of unwinding section */ int module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, char *secstr, struct module *mod) @@ -40,8 +36,7 @@ int module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, mod->arch.unw_info = NULL; for (i = 1; i < hdr->e_shnum; i++) { - if (strcmp(secstr+sechdrs[i].sh_name, ".debug_frame") == 0) { - sechdrs[i].sh_flags |= SHF_ALLOC; + if (strcmp(secstr+sechdrs[i].sh_name, ".eh_frame") == 0) { mod->arch.unw_sec_idx = i; break; } |