* Applied patch by Romain Picard: added support for the GNU extension dladdr(),
thanks! * This closes ticket #2818. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28308 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
+14
-3
@@ -1,8 +1,10 @@
|
||||
/*
|
||||
* Copyright 2003-2008, Haiku Inc. All Rights Reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef _DLFCN_H
|
||||
#define _DLFCN_H
|
||||
/*
|
||||
** Distributed under the terms of the OpenBeOS License.
|
||||
*/
|
||||
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
@@ -17,10 +19,19 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* This is a gnu extension for the dladdr function */
|
||||
typedef struct {
|
||||
const char *dli_fname; /* Filename of defining object */
|
||||
void *dli_fbase; /* Load address of that object */
|
||||
const char *dli_sname; /* Name of nearest lower symbol */
|
||||
void *dli_saddr; /* Exact value of nearest symbol */
|
||||
} Dl_info;
|
||||
|
||||
extern int dlclose(void *image);
|
||||
extern char *dlerror(void);
|
||||
extern void *dlopen(const char *path, int mode);
|
||||
extern void *dlsym(void *image, const char *symbolName);
|
||||
extern int dladdr(void *addr, Dl_info *info);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user