Common: adds more gcc constrants

This commit is contained in:
李通洲
2026-09-17 21:00:36 +08:00
parent 6ff7f2772b
commit 97ac94eb44
29 changed files with 344 additions and 285 deletions
+2 -2
View File
@@ -161,8 +161,8 @@ void* dlsym(void* handle, const char* symbol) {
}
void* ffLibraryGetModule(const wchar_t* libraryFileName) {
assert(libraryFileName != nullptr && "Use \"ffGetPeb()->ImageBaseAddress\" instead");
// `libraryFileName` is non-null per the `nonnull(1)` contract.
// Prefer `ffGetPeb()->ImageBaseAddress` over looking the main module up by name.
void* module = nullptr;
USHORT libraryFileNameBytes = (USHORT) (wcslen(libraryFileName) * sizeof(wchar_t) + sizeof(wchar_t));
NTSTATUS status = LdrGetDllHandle(nullptr, nullptr, &(UNICODE_STRING) {