Skip to content

Commit

Permalink
Android: Use rt.sections_elf_shared, not rt.sections_android
Browse files Browse the repository at this point in the history
Android supports native ELF TLS since API level 29 (Android v10),
so we can use the generic rt.sections_elf_shared implementation now,
which among other things also enables *shared* druntime/Phobos libs.
  • Loading branch information
kinke authored and dlang-bot committed Jun 12, 2024
1 parent 94057df commit 635aeb7
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 306 deletions.
1 change: 0 additions & 1 deletion druntime/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ src/rt/dwarfeh.d @WalterBright
src/rt/lifetime.d @rainers @schveiguy @Burgos
src/rt/minfo.d @schveiguy
src/rt/msvc* @rainers
src/rt/sections_android.d @joakim-noah
src/rt/sections_win* @rainers @CyberShadow
src/rt/sections_osx* @jacob-carlborg @klickverbot
src/rt/sections_elf_shared* @Burgos
Expand Down
1 change: 0 additions & 1 deletion druntime/mak/DOCS
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,6 @@ DOCS=\
$(DOCDIR)\rt_lifetime.html \
$(DOCDIR)\rt_minfo.html \
$(DOCDIR)\rt_profilegc.html \
$(DOCDIR)\rt_sections_android.html \
$(DOCDIR)\rt_sections_elf_shared.html \
$(DOCDIR)\rt_sections_osx_x86.html \
$(DOCDIR)\rt_sections_osx_x86_64.html \
Expand Down
1 change: 0 additions & 1 deletion druntime/mak/SRCS
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,6 @@ SRCS=\
src\rt\msvc_math.d \
src\rt\profilegc.d \
src\rt\sections.d \
src\rt\sections_android.d \
src\rt\sections_darwin_64.d \
src\rt\sections_elf_shared.d \
src\rt\sections_osx_x86.d \
Expand Down
18 changes: 13 additions & 5 deletions druntime/src/core/sys/posix/dlfcn.d
Original file line number Diff line number Diff line change
Expand Up @@ -372,12 +372,20 @@ else version (Solaris)
}
else version (CRuntime_Bionic)
{
enum
enum RTLD_LOCAL = 0;
enum RTLD_LAZY = 0x00001;
enum RTLD_NOLOAD = 0x00004;
enum RTLD_NODELETE = 0x01000;

version (D_LP64)
{
enum RTLD_NOW = 0x00002;
enum RTLD_GLOBAL = 0x00100;
}
else // NDK: 'LP32 is broken for historical reasons'
{
RTLD_NOW = 0,
RTLD_LAZY = 1,
RTLD_LOCAL = 0,
RTLD_GLOBAL = 2
enum RTLD_NOW = 0;
enum RTLD_GLOBAL = 0x00002;
}

int dladdr(const scope void*, Dl_info*);
Expand Down
2 changes: 1 addition & 1 deletion druntime/src/rt/sections.d
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ else version (Darwin)
else version (CRuntime_Microsoft)
public import rt.sections_win64;
else version (CRuntime_Bionic)
public import rt.sections_android;
public import rt.sections_elf_shared;
else version (CRuntime_UClibc)
public import rt.sections_elf_shared;
else
Expand Down
297 changes: 0 additions & 297 deletions druntime/src/rt/sections_android.d

This file was deleted.

1 change: 1 addition & 0 deletions druntime/src/rt/sections_elf_shared.d
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ else version (CRuntime_Musl) enum SharedELF = true;
else version (FreeBSD) enum SharedELF = true;
else version (NetBSD) enum SharedELF = true;
else version (DragonFlyBSD) enum SharedELF = true;
else version (CRuntime_Bionic) enum SharedELF = true;
else version (CRuntime_UClibc) enum SharedELF = true;
else enum SharedELF = false;
static if (SharedELF):
Expand Down

0 comments on commit 635aeb7

Please sign in to comment.