From patchwork Wed Mar 23 15:55:03 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ken Werner X-Patchwork-Id: 760 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:45:31 -0000 Delivered-To: patches@linaro.org Received: by 10.220.180.8 with SMTP id bs8cs11686vcb; Wed, 23 Mar 2011 08:55:13 -0700 (PDT) Received: by 10.14.48.7 with SMTP id u7mr2549116eeb.221.1300895711284; Wed, 23 Mar 2011 08:55:11 -0700 (PDT) Received: from mtagate2.uk.ibm.com (mtagate2.uk.ibm.com [194.196.100.162]) by mx.google.com with ESMTPS id p57si12045111eeh.62.2011.03.23.08.55.10 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 23 Mar 2011 08:55:11 -0700 (PDT) Received-SPF: neutral (google.com: 194.196.100.162 is neither permitted nor denied by best guess record for domain of ken.werner@linaro.org) client-ip=194.196.100.162; Authentication-Results: mx.google.com; spf=neutral (google.com: 194.196.100.162 is neither permitted nor denied by best guess record for domain of ken.werner@linaro.org) smtp.mail=ken.werner@linaro.org Received: from d06nrmr1307.portsmouth.uk.ibm.com (d06nrmr1307.portsmouth.uk.ibm.com [9.149.38.129]) by mtagate2.uk.ibm.com (8.13.1/8.13.1) with ESMTP id p2NFtAu3022557 for ; Wed, 23 Mar 2011 15:55:10 GMT Received: from d06av11.portsmouth.uk.ibm.com (d06av11.portsmouth.uk.ibm.com [9.149.37.252]) by d06nrmr1307.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p2NFtbvq1925164 for ; Wed, 23 Mar 2011 15:55:37 GMT Received: from d06av11.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av11.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p2NFt9G2022512 for ; Wed, 23 Mar 2011 09:55:09 -0600 Received: from localhost.localdomain (dyn-9-152-224-51.boeblingen.de.ibm.com [9.152.224.51]) by d06av11.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id p2NFt7Tw022296; Wed, 23 Mar 2011 09:55:09 -0600 From: Ken Werner To: libunwind-devel@nongnu.org Subject: [PATCH 5/8] Remove the appname string of the ARM extbl parser. Date: Wed, 23 Mar 2011 15:55:03 +0000 Message-Id: <1300895706-5424-6-git-send-email-ken.werner@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1300895706-5424-1-git-send-email-ken.werner@linaro.org> References: <1300895706-5424-1-git-send-email-ken.werner@linaro.org> 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 --- include/tdep-arm/ex_tables.h | 2 +- src/arm/Ginit_local.c | 2 +- src/arm/ex_tables.c | 10 ++-------- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/include/tdep-arm/ex_tables.h b/include/tdep-arm/ex_tables.h index 698792f..625c780 100644 --- a/include/tdep-arm/ex_tables.h +++ b/include/tdep-arm/ex_tables.h @@ -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, struct arm_exidx_entry *end); struct arm_exidx_table *arm_exidx_table_find (void *pc); diff --git a/src/arm/Ginit_local.c b/src/arm/Ginit_local.c index cdf05d2..f8ee19c 100644 --- a/src/arm/Ginit_local.c +++ b/src/arm/Ginit_local.c @@ -50,7 +50,7 @@ unw_init_local (unw_cursor_t *cursor, ucontext_t *uc) c->dwarf.as_arg = uc; if (UNW_TRY_METHOD (UNW_ARM_METHOD_EXIDX)) - arm_exidx_init_local ("libunwind"); + arm_exidx_init_local (); return common_init (c, 1); } diff --git a/src/arm/ex_tables.c b/src/arm/ex_tables.c index abe9a77..a723db5 100644 --- a/src/arm/ex_tables.c +++ b/src/arm/ex_tables.c @@ -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 unsigned arm_exidx_table_count = 0; #endif -static const char *arm_exidx_appname; static inline uint32_t 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) 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 (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 + size)); 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. */ HIDDEN int -arm_exidx_init_local (const char *appname) +arm_exidx_init_local (void) { - arm_exidx_appname = appname; arm_exidx_table_reset_all(); return dl_iterate_phdr (&arm_exidx_init_local_cb, NULL); }