From 786882ff8c0d1317558a4a805b2be319e64cb6a9 Mon Sep 17 00:00:00 2001 From: Arun Sharma Date: Sat, 12 Nov 2011 10:02:09 -0800 Subject: [PATCH] Remove unused variable segbase --- src/dwarf/Gfind_proc_info-lsb.c | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/src/dwarf/Gfind_proc_info-lsb.c b/src/dwarf/Gfind_proc_info-lsb.c index e5e20b7b..1e0302b8 100644 --- a/src/dwarf/Gfind_proc_info-lsb.c +++ b/src/dwarf/Gfind_proc_info-lsb.c @@ -545,7 +545,7 @@ dwarf_callback (struct dl_phdr_info *info, size_t size, void *ptr) unw_dyn_info_t *di = &cb_data->di; const Elf_W(Phdr) *phdr, *p_eh_hdr, *p_dynamic, *p_text; unw_word_t addr, eh_frame_start, eh_frame_end, fde_count, ip; - Elf_W(Addr) load_base, segbase = 0, max_load_addr = 0; + Elf_W(Addr) load_base, max_load_addr = 0; int ret, need_unwind_info = cb_data->need_unwind_info; unw_proc_info_t *pi = cb_data->pi; struct dwarf_eh_frame_hdr *hdr; @@ -597,27 +597,6 @@ dwarf_callback (struct dl_phdr_info *info, size_t size, void *ptr) if (p_eh_hdr) { - if (likely (p_eh_hdr->p_vaddr >= p_text->p_vaddr - && p_eh_hdr->p_vaddr < p_text->p_vaddr + p_text->p_memsz)) - /* normal case: eh-hdr is inside text segment */ - segbase = p_text->p_vaddr + load_base; - else - { - /* Special case: eh-hdr is in some other segment; this may - happen, e.g., for the Linux kernel's gate DSO, for - example. */ - phdr = info->dlpi_phdr; - for (n = info->dlpi_phnum; --n >= 0; phdr++) - { - if (phdr->p_type == PT_LOAD && p_eh_hdr->p_vaddr >= phdr->p_vaddr - && p_eh_hdr->p_vaddr < phdr->p_vaddr + phdr->p_memsz) - { - segbase = phdr->p_vaddr + load_base; - break; - } - } - } - if (p_dynamic) { /* For dynamicly linked executables and shared libraries,