am b025c42a: Force memory unwinds to use a zero map offset.
* commit 'b025c42a5335e46ab117eb5e55822483ae1cf1b4':
Force memory unwinds to use a zero map offset.
diff --git a/Android.build.mk b/Android.build.mk
index afb78ff..fc9324b 100644
--- a/Android.build.mk
+++ b/Android.build.mk
@@ -107,7 +107,7 @@
LOCAL_SRC_FILES_arm64 := \
$(subst src/arm64,src/aarch64,$(LOCAL_SRC_FILES_arm64))
-LOCAL_ADDRESS_SANITIZER := false
+LOCAL_SANITIZE := never
ifeq ($(libunwind_build_type),target)
include $(BUILD_$(libunwind_build_target))
diff --git a/Android.mk b/Android.mk
index 0b94b48..d2e5c06 100644
--- a/Android.mk
+++ b/Android.mk
@@ -253,8 +253,6 @@
libunwind_build_type := host
include $(LOCAL_PATH)/Android.build.mk
libunwind_build_type := target
-# Make sure the static library functions do not interfere with shared version.
-libunwind_cflags += -DUNW_ADDITIONAL_PREFIX
libunwind_build_target := STATIC_LIBRARY
include $(LOCAL_PATH)/Android.build.mk
libunwind_build_type := host
@@ -285,8 +283,7 @@
libunwindbacktrace_cflags += \
-Wno-old-style-declaration \
- -fvisibility=hidden \
- -DUNW_ADDITIONAL_PREFIX \
+ -fvisibility=hidden
libunwind_module := libunwindbacktrace
libunwind_module_tag := optional
diff --git a/src/arm/Gex_tables.c b/src/arm/Gex_tables.c
index 7b3e151..64ff380 100644
--- a/src/arm/Gex_tables.c
+++ b/src/arm/Gex_tables.c
@@ -53,12 +53,6 @@
unw_dyn_info_t di; /* info about the ARM exidx segment */
};
-static inline uint32_t CONST_ATTR
-prel31_read (uint32_t prel31)
-{
- return ((int32_t)prel31 << 1) >> 1;
-}
-
static inline int
prel31_to_addr (unw_addr_space_t as, void *arg, unw_word_t prel31,
unw_word_t *val)
diff --git a/src/dwarf/Gfind_unwind_table.c b/src/dwarf/Gfind_unwind_table.c
index 52ded19..9de3ad5 100644
--- a/src/dwarf/Gfind_unwind_table.c
+++ b/src/dwarf/Gfind_unwind_table.c
@@ -130,7 +130,6 @@
GET_EHDR_FIELD(ei, &ehdr, e_phoff, false);
GET_EHDR_FIELD(ei, &ehdr, e_phnum, false);
- Elf_W(Phdr) phdr;
Elf_W(Off) offset = ehdr.e_phoff;
Elf_W(Off) txt_phdr_offset = 0;
Elf_W(Addr) txt_pvaddr = 0;
@@ -218,7 +217,7 @@
#if UNW_TARGET_ARM
// Verify that the map contains enough space for the arm unwind data.
if (arm_exidx_phdr_offset &&
- arm_exidx_phdr_offset + sizeof(phdr) < ei->u.memory.map->end - ei->u.memory.map->start) {
+ arm_exidx_phdr_offset + sizeof(Elf_W(Phdr)) < ei->u.memory.map->end - ei->u.memory.map->start) {
Elf_W(Phdr) phdr;
GET_PHDR_FIELD(ei, arm_exidx_phdr_offset, &phdr, p_vaddr);
GET_PHDR_FIELD(ei, arm_exidx_phdr_offset, &phdr, p_memsz);