vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I'm trying to dlopen() a module built with -brtl. The main application is also built with -brtl. The code isn't anything complex: #include <stdio.h> #include <stdlib.h> #include <dlfcn.h> #include <errno.h> #define FILE "/opt/TWWfsw/rpm42/lib/python235/rpm.so" int main (void) { void *dl; dl = dlopen (FILE, RTLD_GLOBAL | RTLD_NOW); if (!dl) { printf ("errno: %d\n", errno); puts (dlerror ()); exit (1); } dlclose (dl); } $ xlc -brtl dlopen.c $ ./a.out errno: 8 Exec format error dlerror() is no help. How else can I find out why the module isn't dlopen()'ing? The problem occurs on AIX 4.3.3 and AIX 5.1. AIX 5.2 dlopen()'s it ok. Everything is built the same on all platforms. On Solaris 10, I get something very helpful: $ cc dlopen.c $ ./a.out errno: 0 ld.so.1: ./a.out: fatal: relocation error: file /opt/TWWfsw/rpm42/lib/python235/rpm.so: symbol PyFile_Type: referenced symbol not found -- albert chin (china @at@ thewrittenword .dot. com) |