From d6bd4fa5dbf22a388e949638e80c8df433c7dc7c Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Fri, 25 Jan 2019 00:54:18 +0300 Subject: [PATCH] Workaround 'wrong __data_start/_end' if __end__ is incorrect (Android) Issue #259 (bdwgc). To prevent use of __end__ symbol, "-D BROKEN_UUENDUU_SYM" should be passed to CFLAGS. * include/private/gcconfig.h [HOST_ANDROID && __clang__] (DATAEND): Do not redefine to __end__ if BROKEN_UUENDUU_SYM. --- include/private/gcconfig.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h index a5f81f4..cb57ac1 100644 --- a/include/private/gcconfig.h +++ b/include/private/gcconfig.h @@ -2953,7 +2953,8 @@ EXTERN_C_BEGIN /* Workaround for Android NDK clang 3.5+ (as of NDK r10e) which does */ /* not provide correct _end symbol. Unfortunately, alternate __end__ */ /* symbol is provided only by NDK "bfd" linker. */ -#if defined(HOST_ANDROID) && defined(__clang__) +#if defined(HOST_ANDROID) && defined(__clang__) \ + && !defined(BROKEN_UUENDUU_SYM) # undef DATAEND # pragma weak __end__ extern int __end__[]; -- 2.7.4