Android源码阅读-dlopen
本次阅读源码来自aosp Android 8.1.0_r1,在阅读过程中根据阅读的进度随手记录
有过 linux 编成经验的都应该知道使用 dlopen 需要包含 dlfcn.h 头文件,所以直接去aosp/bionic/libc/include/dlfcn.h 中找到 dlopen 的函数定义。
1 | void* dlopen(const char* filename, int flag); |
通过dlopen的定义找到其实现在 aosp/bionic/libdl/libdl.c 中,
1 | // Proxy calls to bionic loader |