- 论坛徽章:
- 1
|
sunlan 摘录的是哪儿的 man 手册?
Linux 的确不是这样的。
下面是我的 Debian 上的 man page:
- dlsym
- The function dlsym() takes a "handle" of a dynamic library returned by
- dlopen() and the null-terminated symbol name, returning the address
- where that symbol is loaded into memory. If the symbol is not found,
- in the specified library or any of the libraries that were automati-
- cally loaded by dlopen() when that library was loaded, dlsym() returns
- NULL. (The search performed by dlsym() is breadth first through the
- dependency tree of these libraries.) Since the value of the symbol
- could actually be NULL (so that a NULL return from dlsym() need not
- indicate an error), the correct way to test for an error is to call
- dlerror() to clear any old error conditions, then call dlsym(), and
- then call dlerror() again, saving its return value into a variable, and
- check whether this saved value is not NULL.
复制代码 |
|