mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2025-01-10 19:23:41 +01:00
Remove the appname string of the ARM extbl parser.
There is no need for libunwind to set/fake a name of the elf file from which the program header came from. Signed-off-by: Ken Werner <ken.werner@linaro.org>
This commit is contained in:
parent
dcb8d0d90f
commit
6296ff1fb2
3 changed files with 4 additions and 10 deletions
|
@ -61,7 +61,7 @@ struct arm_exbuf_data
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
int arm_exidx_init_local (const char *appname);
|
int arm_exidx_init_local (void);
|
||||||
int arm_exidx_table_add (const char *name, struct arm_exidx_entry *start,
|
int arm_exidx_table_add (const char *name, struct arm_exidx_entry *start,
|
||||||
struct arm_exidx_entry *end);
|
struct arm_exidx_entry *end);
|
||||||
struct arm_exidx_table *arm_exidx_table_find (void *pc);
|
struct arm_exidx_table *arm_exidx_table_find (void *pc);
|
||||||
|
|
|
@ -50,7 +50,7 @@ unw_init_local (unw_cursor_t *cursor, ucontext_t *uc)
|
||||||
c->dwarf.as_arg = uc;
|
c->dwarf.as_arg = uc;
|
||||||
|
|
||||||
if (UNW_TRY_METHOD (UNW_ARM_METHOD_EXIDX))
|
if (UNW_TRY_METHOD (UNW_ARM_METHOD_EXIDX))
|
||||||
arm_exidx_init_local ("libunwind");
|
arm_exidx_init_local ();
|
||||||
|
|
||||||
return common_init (c, 1);
|
return common_init (c, 1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,6 @@ static struct arm_exidx_table *arm_exidx_table_list;
|
||||||
static struct arm_exidx_table arm_exidx_tables[ARM_EXIDX_TABLE_LIMIT];
|
static struct arm_exidx_table arm_exidx_tables[ARM_EXIDX_TABLE_LIMIT];
|
||||||
static unsigned arm_exidx_table_count = 0;
|
static unsigned arm_exidx_table_count = 0;
|
||||||
#endif
|
#endif
|
||||||
static const char *arm_exidx_appname;
|
|
||||||
|
|
||||||
static inline uint32_t
|
static inline uint32_t
|
||||||
prel31_read (uint32_t prel31)
|
prel31_read (uint32_t prel31)
|
||||||
|
@ -436,14 +435,10 @@ arm_exidx_init_local_cb (struct dl_phdr_info *info, size_t size, void *data)
|
||||||
if (phdr->p_type != PT_ARM_EXIDX)
|
if (phdr->p_type != PT_ARM_EXIDX)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
const char *name = info->dlpi_name;
|
|
||||||
if (NULL == name || 0 == name[0])
|
|
||||||
name = arm_exidx_appname;
|
|
||||||
|
|
||||||
ElfW (Addr) addr = info->dlpi_addr + phdr->p_vaddr;
|
ElfW (Addr) addr = info->dlpi_addr + phdr->p_vaddr;
|
||||||
ElfW (Word) size = phdr->p_filesz;
|
ElfW (Word) size = phdr->p_filesz;
|
||||||
|
|
||||||
arm_exidx_table_add (name,
|
arm_exidx_table_add (info->dlpi_name,
|
||||||
(struct arm_exidx_entry *)addr,
|
(struct arm_exidx_entry *)addr,
|
||||||
(struct arm_exidx_entry *)(addr + size));
|
(struct arm_exidx_entry *)(addr + size));
|
||||||
break;
|
break;
|
||||||
|
@ -456,9 +451,8 @@ arm_exidx_init_local_cb (struct dl_phdr_info *info, size_t size, void *data)
|
||||||
* shared objects to collect the unwind tables.
|
* shared objects to collect the unwind tables.
|
||||||
*/
|
*/
|
||||||
HIDDEN int
|
HIDDEN int
|
||||||
arm_exidx_init_local (const char *appname)
|
arm_exidx_init_local (void)
|
||||||
{
|
{
|
||||||
arm_exidx_appname = appname;
|
|
||||||
arm_exidx_table_reset_all();
|
arm_exidx_table_reset_all();
|
||||||
return dl_iterate_phdr (&arm_exidx_init_local_cb, NULL);
|
return dl_iterate_phdr (&arm_exidx_init_local_cb, NULL);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue