Skip to content

Commit 641bc2a

Browse files
committed
Modified for protocol conformances in cygwin
1 parent 18e765e commit 641bc2a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

stdlib/public/runtime/CygwinPort.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ int swift::_swift_dl_iterate_phdr(int (*Callback)(struct dl_phdr_info *info,
8585

8686
uint8_t *swift::_swift_getSectionDataPE(void *handle, const char *sectionName,
8787
unsigned long *sectionSize) {
88+
// In Cygwin, dlopen() returns PE/COFF image pointer.
89+
// This is relying on undocumented feature of Windows API LoadLibrary().
8890
unsigned char *peStart = (unsigned char *)handle;
8991

9092
int ntHeadersOffset = peStart[0x3C];

0 commit comments

Comments
 (0)