2018-12-17 08:01:31 +01:00
|
|
|
diff --git a/src/rt/sections_android.d b/src/rt/sections_android.d
|
2019-09-03 19:06:03 +02:00
|
|
|
index 33644151..34a2ae5e 100644
|
2018-12-17 08:01:31 +01:00
|
|
|
--- a/src/rt/sections_android.d
|
|
|
|
+++ b/runtime/druntime/src/rt/sections_android.d
|
|
|
|
@@ -76,7 +76,11 @@ void initSections() nothrow @nogc
|
|
|
|
_sections.moduleGroup = ModuleGroup(mbeg[0 .. mend - mbeg]);
|
|
|
|
|
|
|
|
auto pbeg = cast(void*)&_tlsend;
|
|
|
|
- auto pend = cast(void*)&__bss_end__;
|
|
|
|
+ version(X86) auto pend = cast(void*)&_end;
|
|
|
|
+ else version(X86_64) auto pend = cast(void*)& _end;
|
|
|
|
+ else version(ARM) auto pend = cast(void*)& __bss_end__;
|
|
|
|
+ else version(AArch64) auto pend = cast(void*)& __bss_end__;
|
|
|
|
+ else static assert( false, "Android architecture not supported." );
|
|
|
|
// _tlsend is a 32-bit int and may not be 64-bit void*-aligned, so align pbeg.
|
2019-09-03 19:06:03 +02:00
|
|
|
version (D_LP64) pbeg = cast(void*)(cast(size_t)(pbeg + 7) & ~cast(size_t)7);
|
2018-12-17 08:01:31 +01:00
|
|
|
_sections._gcRanges[0] = pbeg[0 .. pend - pbeg];
|
2019-09-03 19:06:03 +02:00
|
|
|
@@ -180,7 +184,11 @@ extern(C)
|
2018-12-17 08:01:31 +01:00
|
|
|
void* __stop_minfo;
|
|
|
|
}
|
|
|
|
|
|
|
|
- size_t __bss_end__;
|
|
|
|
+ version(X86) size_t _end;
|
|
|
|
+ else version(X86_64) size_t _end;
|
|
|
|
+ else version(ARM) size_t __bss_end__;
|
|
|
|
+ else version(AArch64) size_t __bss_end__;
|
|
|
|
+ else static assert( false, "Android architecture not supported." );
|
|
|
|
|
|
|
|
int _tlsstart;
|
|
|
|
int _tlsend;
|