Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ypliang19/symdl
symdl is a simple little tool, its function is very similar to dlsym, with symdl, you can pass any global C function name string, so as to achieve the dynamic call of C function.
https://github.com/ypliang19/symdl
dlopen dlsym hotfix ios swift symdl
Last synced: 2 months ago
JSON representation
symdl is a simple little tool, its function is very similar to dlsym, with symdl, you can pass any global C function name string, so as to achieve the dynamic call of C function.
- Host: GitHub
- URL: https://github.com/ypliang19/symdl
- Owner: YPLiang19
- License: mit
- Created: 2019-05-30T02:47:37.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-08-07T07:53:09.000Z (over 1 year ago)
- Last Synced: 2024-11-01T04:42:43.665Z (3 months ago)
- Topics: dlopen, dlsym, hotfix, ios, swift, symdl
- Language: C
- Homepage:
- Size: 389 KB
- Stars: 73
- Watchers: 2
- Forks: 13
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# symdl
symdl is a simple little tool, its function is very similar to dlsym, with symdl, you can pass any global C function or global variable name string, so as to achieve the dynamic call of C function or access the global variable.## Example
```
#import
#importint MyIntGlobalVar = 10;
int main(){
FILE *(*my_fopne)(char *, char*) = symdl("fopen");
FILE *fp = my_fopne("your path","w+");
//do something
int *MyIntGlobalVarPtr = (int *)symdl("MyIntGlobalVar");
printf("MyIntGlobalVar: %d\n", *MyIntGlobalVarPtr);
return 0;
}```
## Installation
### CocoaPods
1. Add `pod 'symdl'` to your Podfile.
2. Run `pod install` or `pod update`.
3. Import ``