Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(725)

Unified Diff: fusl/src/ldso/arm/find_exidx.c

Issue 1724903002: [fusl] Remove code for unsupported architectures (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fusl/src/ldso/arm/dlsym.s ('k') | fusl/src/ldso/i386/dlsym.s » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fusl/src/ldso/arm/find_exidx.c
diff --git a/fusl/src/ldso/arm/find_exidx.c b/fusl/src/ldso/arm/find_exidx.c
deleted file mode 100644
index 93323f73b38e8db5226bf56c2d914805e663f31b..0000000000000000000000000000000000000000
--- a/fusl/src/ldso/arm/find_exidx.c
+++ /dev/null
@@ -1,40 +0,0 @@
-#define _GNU_SOURCE
-#include <link.h>
-#include <stdint.h>
-
-struct find_exidx_data {
- uintptr_t pc, exidx_start;
- int exidx_len;
-};
-
-static int find_exidx(struct dl_phdr_info* info, size_t size, void* ptr) {
- struct find_exidx_data* data = ptr;
- const ElfW(Phdr)* phdr = info->dlpi_phdr;
- uintptr_t addr, exidx_start = 0;
- int i, match = 0, exidx_len = 0;
-
- for (i = info->dlpi_phnum; i > 0; i--, phdr++) {
- addr = info->dlpi_addr + phdr->p_vaddr;
- switch (phdr->p_type) {
- case PT_LOAD:
- match |= data->pc >= addr && data->pc < addr + phdr->p_memsz;
- break;
- case PT_ARM_EXIDX:
- exidx_start = addr;
- exidx_len = phdr->p_memsz;
- break;
- }
- }
- data->exidx_start = exidx_start;
- data->exidx_len = exidx_len;
- return match;
-}
-
-uintptr_t __gnu_Unwind_Find_exidx(uintptr_t pc, int* pcount) {
- struct find_exidx_data data;
- data.pc = pc;
- if (dl_iterate_phdr(find_exidx, &data) <= 0)
- return 0;
- *pcount = data.exidx_len / 8;
- return data.exidx_start;
-}
« no previous file with comments | « fusl/src/ldso/arm/dlsym.s ('k') | fusl/src/ldso/i386/dlsym.s » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698