Mail Archives: djgpp-workers/2005/01/07/13:27:58
According to ams AT ludd DOT ltu DOT se:
> dlopen.o: (P),(O)
> dlopen.o: (P) != stub (_dl_nmaxsymtab)
> T _dl_nmaxsymtab
> T _dl_nsymtab
> T _dl_symtabs
> T _dl_unresolved_count
> T _dl_unresolved_symbol
> T dlclose
> T dlopen
> T dlsym
> T dlsymresolver
> U _chmod
> U _close
> U _open
> U _read
> U _truename
> U errno
> U free
> U getenv
> U malloc
> U memcpy
> U memset
> U strchr
> U strcmp
> U strcpy
> U strspn
dlsymresolver isn't POSIX. Patch follows.
Right,
MartinS
Index: djgpp/include/sys/dxe.h
===================================================================
RCS file: /cvs/djgpp/djgpp/include/sys/dxe.h,v
retrieving revision 1.4
diff -p -u -r1.4 dxe.h
--- djgpp/include/sys/dxe.h 23 Apr 2003 18:54:31 -0000 1.4
+++ djgpp/include/sys/dxe.h 7 Jan 2005 18:15:47 -0000
@@ -137,7 +137,7 @@ int dlunregsym (const dxe_symbol_table *
* that the dynamic loader have at his disposition. The handler should return
* NULL to rise a error condition, otherwise it should return a valid address.
*/
-extern void *(*dlsymresolver) (const char *symname);
+extern void *(*_dlsymresolver) (const char *symname);
/* The following variable contains a pointer to a function that is being
* called when static linking fails because of missing module. Note that
Index: djgpp/src/libc/dxe/dlopen.c
===================================================================
RCS file: /cvs/djgpp/djgpp/src/libc/dxe/dlopen.c,v
retrieving revision 1.2
diff -p -u -r1.2 dlopen.c
--- djgpp/src/libc/dxe/dlopen.c 29 Apr 2003 03:51:28 -0000 1.2
+++ djgpp/src/libc/dxe/dlopen.c 7 Jan 2005 18:15:55 -0000
@@ -73,7 +73,7 @@ typedef struct __dxe_handle
} dxe_handle, *dxe_h;
/* Last-resort symbol resolver */
-void *(*dlsymresolver) (const char *symname) = NULL;
+void *(*_dlsymresolver) (const char *symname) = NULL;
/* Last-error unresolved symbol count */
int _dl_unresolved_count = 0;
/* Last-error unresolved symbol */
@@ -382,8 +382,8 @@ void *dlsym (void *dxe, const char *symn
}
modscan_done:
- if (!sym && dlsymresolver)
- sym = dlsymresolver (symname);
+ if (!sym && _dlsymresolver)
+ sym = _dlsymresolver (symname);
return sym;
}
Index: djgpp/src/libc/dxe/dlregsym.txh
===================================================================
RCS file: /cvs/djgpp/djgpp/src/libc/dxe/dlregsym.txh,v
retrieving revision 1.1
diff -p -u -r1.1 dlregsym.txh
--- djgpp/src/libc/dxe/dlregsym.txh 23 Apr 2003 06:10:56 -0000 1.1
+++ djgpp/src/libc/dxe/dlregsym.txh 7 Jan 2005 18:15:55 -0000
@@ -53,14 +53,14 @@ Returns number of symbol tables in use i
@portability !ansi, !posix
-@node dlsymresolver, misc
-@findex dlsymresolver
+@node _dlsymresolver, misc
+@findex _dlsymresolver
@subheading Syntax
@example
#include <sys/dxe.h>
-extern void *(*dlsymresolver) (const char *symname);
+extern void *(*_dlsymresolver) (const char *symname);
@end example
@subheading Description
Index: djgpp/tests/dxe/dldemo.cpp
===================================================================
RCS file: /cvs/djgpp/djgpp/tests/dxe/dldemo.cpp,v
retrieving revision 1.1
diff -p -u -r1.1 dldemo.cpp
--- djgpp/tests/dxe/dldemo.cpp 23 Apr 2003 06:39:15 -0000 1.1
+++ djgpp/tests/dxe/dldemo.cpp 7 Jan 2005 18:15:58 -0000
@@ -49,7 +49,7 @@ void *dxe_res (const char *symname)
int main ()
{
// Set the error callback function
- dlsymresolver = dxe_res;
+ _dlsymresolver = dxe_res;
// Register the symbols exported into dynamic modules
dlregsym (syms);
- Raw text -