runtime_loader: Add support for RTLD_NOLOAD

Add support for using `RTLD_NOLOAD` with `dlopen` on Haiku.

While not specified in POSIX, this option is widely available (both
GNU/Linux and BSD) and is the only way to atomically check if a shared
object has been loaded.

Change-Id: I061332307d76c84f6a2abb6f92c4ed964bd90a1e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9161
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
This commit is contained in:
Trung Nguyen
2025-04-14 16:31:59 +00:00
committed by waddlesplash
parent a1e94e45fc
commit 8da9c85cbf
4 changed files with 80 additions and 0 deletions
+1
View File
@@ -13,6 +13,7 @@
#define RTLD_NOW 1 /* the file gets relocated at load time */
#define RTLD_LOCAL 0 /* symbols are not available for relocating any other object */
#define RTLD_GLOBAL 2 /* all symbols are available */
#define RTLD_NOLOAD 4 /* do not load any new object */
/* not-yet-POSIX extensions (dlsym() handles) */
#define RTLD_DEFAULT ((void*)0)