Skip to content

Commit 8248322

Browse files
committed
Remove cause of crash on Android
1 parent 304f556 commit 8248322

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

stdlib/public/runtime/ImageInspectionELF.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,12 @@ static SectionInfo getSectionInfo(const char *imageName,
6868
SectionInfo sectionInfo = { 0, nullptr };
6969
void *handle = dlopen(imageName, RTLD_LAZY | RTLD_NOLOAD);
7070
if (!handle) {
71+
#ifdef __ANDROID__
72+
return sectionInfo;
73+
#else
7174
fatalError(/* flags = */ 0, "dlopen() failed on `%s': %s", imageName,
7275
dlerror());
76+
#endif
7377
}
7478
void *symbol = dlsym(handle, sectionName);
7579
if (symbol) {

0 commit comments

Comments
 (0)