Skip to content

[libc] Add RTLD_NEXT + RTLD_DEFAULT #149909

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

Caslyn
Copy link
Contributor

@Caslyn Caslyn commented Jul 21, 2025

Related to #97920, this patch adds dlsym macros RTLD_NEXT AND RTLD_DEFAULT to dlfcn.h.

Related to llvm#97920, this patch adds `dlsym` macros `RTLD_NEXT` AND
`RTLD_DEFAULT` to dlfcn.h.
@Caslyn Caslyn self-assigned this Jul 21, 2025
@llvmbot llvmbot added the libc label Jul 21, 2025
@llvmbot
Copy link
Member

llvmbot commented Jul 21, 2025

@llvm/pr-subscribers-libc

Author: Caslyn Tonelli (Caslyn)

Changes

Related to #97920, this patch adds dlsym macros RTLD_NEXT AND RTLD_DEFAULT to dlfcn.h.


Full diff: https://github.com/llvm/llvm-project/pull/149909.diff

1 Files Affected:

  • (modified) libc/include/dlfcn.yaml (+8)
diff --git a/libc/include/dlfcn.yaml b/libc/include/dlfcn.yaml
index 28be34dbd95bd..6afeb70b89e76 100644
--- a/libc/include/dlfcn.yaml
+++ b/libc/include/dlfcn.yaml
@@ -29,6 +29,14 @@ macros:
     standards:
       - gnu
     macro_value: "0x01000"
+  - macro_name: RTLD_NEXT
+    standards:
+      - gnu
+    macro_value: "((void *) -1l)"
+  - macro_name: RTLD_DEFAULT
+    standards:
+      - gnu
+    macro_value: "((void *) 0)"
 functions:
   - name: dlclose
     standards:

Copy link
Contributor

@frobtech frobtech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants