From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: X-Archive-Original-Message-ID: <199801110239.VAA03041@harrison.blueskyprod.com> Date: Sat, 10 Jan 1998 21:42:32 -0500 From: Richard Hadsell Subject: Re: Unidentified subject! This is a multi-part message in MIME format. --------------1372500F2847 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Uncle George wrote: > > how about this: > > strace foo > > where foo.c = > main(){ > char * p = (char*) dlopen("ur lib here", RTLD_LAZY); > } > does this work ? Dan is the Linux guy, I'm the compiler guy. I tried your suggestion, and here are the results. Can you interpret the trace and tell me anything about it? I'm attaching the trace output separately, in the hope that the mailer won't wrap the long lines and make it difficult to interpret. --------------- loki1 studio/final 33% cat foo.c #include #include main(){ char * p = (char*) dlopen("/usr/net/dlib/studio++/clothMapping.so", RTLD_LAZY); if (p) printf("good\n"); else printf("bad\n"); } loki1 studio/final 34% ecc -v Reading specs from /usr/local/lib/gcc-lib/alphaev5-unknown-linux-gnu/egcs-2.90.23/specs gcc version egcs-2.90.23 980102 (egcs-1.0.1 release) loki1 studio/final 35% ecc foo.c -o foo -ldl loki1 studio/final 36% foo bad loki1 studio/final 37% strace foo > & foo.trace loki1 studio/final 38% -- Dick Hadsell 914-381-8400 Fax: 914-381-9790 Reply-to: hadsell@blueskystudios.com Blue Sky | VIFX http://www.blueskystudios.com 1 South Road, Harrison, NY 10528 --------------1372500F2847 Content-Type: text/plain; charset=us-ascii; name="foo.trace" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="foo.trace" execve("./foo", ["foo"], [/* 59 vars */]) = 0 brk(0) = 0x120100ae8 open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/net/lib/libdl.so.2.1", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/local/lib/libdl.so.2.1", O_RDONLY) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=7526, ...}) = 0 mmap(0, 4831832856, PROT_READ, 0 /* MAP_??? */, 0, 0) = 0x15555564000 close(3) = 0 open("/lib/libdl.so.2.1", O_RDONLY) = 3 mmap(0, 0, PROT_NONE, 0 /* MAP_??? */, 0, 0) = 0x15555566000 munmap(0x15555566000, 8192) = 0 mmap(0, 8192, PROT_NONE, 0 /* MAP_??? */, 0, 0) = 0x15555666000 mprotect(0x1555566a000, 1041664, PROT_NONE) = 0 mmap(0x15555766000, 1041664, PROT_NONE, 0 /* MAP_??? */, 0, 0) = 0x15555766000 close(3) = 0 open("/usr/net/lib/libc.so.6.1", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/local/lib/libc.so.6.1", O_RDONLY) = -1 ENOENT (No such file or directory) open("/lib/libc.so.6.1", O_RDONLY) = 3 mmap(0, 0, PROT_NONE, 0 /* MAP_??? */, 0, 0) = 0x15555566000 munmap(0x15555566000, 8192) = 0 mmap(0, 8192, PROT_NONE, 0 /* MAP_??? */, 0, 0) = 0x1555576a000 mprotect(0x15555834000, 1132008, PROT_NONE) = 0 mmap(0x1555586a000, 1132008, PROT_NONE, 0 /* MAP_??? */, 0, 0) = 0x1555586a000 mmap(0x1555593e000, 1132008, PROT_NONE, 0 /* MAP_??? */, 0, 0) = 0x1555593e000 close(3) = 0 personality(PER_LINUX) = 0 osf_getsysinfo(0x2d, 0x11ffff158, 0x11ffff1c0, 0, 0x300000000) = 0 osf_setsysinfo(0xe, 0x11ffff158, 0x11ffff1c0, 0, 0x300000000) = 0 getxpid() = 916 open("/usr/net/dlib/studio++/clothMapping.so", O_RDONLY) = 3 brk(0) = 0x120100ae8 brk(0x120100b38) = 0x120100b38 brk(0x120102000) = 0x120102000 mmap(0, 0, PROT_WRITE, 0 /* MAP_??? */, 12884901888, 0) = 0x15555566000 munmap(0x15555566000, 8192) = 0 mmap(0, 8192, PROT_WRITE, 0 /* MAP_??? */, 12884901888, 0) = 0x1555594a000 mprotect(0x15555960000, 1048152, PROT_NONE) = 0 mmap(0x15555a4a000, 1048152, PROT_NONE, 0 /* MAP_??? */, 12884901888, 0) = 0x15555a4a000 close(3) = 0 open("/usr/net/lib/libstdc++.so.2.8", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/local/lib/libstdc++.so.2.8", O_RDONLY) = 3 mmap(0, 0, PROT_NONE, 0 /* MAP_??? */, 12884901888, 0) = 0x15555566000 munmap(0x15555566000, 8192) = 0 mmap(0, 8192, PROT_NONE, 0 /* MAP_??? */, 12884901888, 0) = 0x15555a60000 mprotect(0x15555ab6000, 1071176, PROT_NONE) = 0 mmap(0x15555b60000, 1071176, PROT_NONE, 0 /* MAP_??? */, 12884901888, 0) = 0x15555b60000 mmap(0x15555bba000, 1071176, PROT_NONE, 0 /* MAP_??? */, 12884901888, 0) = 0x15555bba000 close(3) = 0 open("/usr/net/lib/libm.so.6.1", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/local/lib/libm.so.6.1", O_RDONLY) = -1 ENOENT (No such file or directory) open("/lib/libm.so.6.1", O_RDONLY) = 3 mmap(0, 0, PROT_NONE, 0 /* MAP_??? */, 12884901888, 0) = 0x15555566000 munmap(0x15555566000, 8192) = 0 mmap(0, 8192, PROT_NONE, 0 /* MAP_??? */, 12884901888, 0) = 0x15555bbc000 mprotect(0x15555bea000, 1053200, PROT_NONE) = 0 mmap(0x15555cbc000, 1053200, PROT_NONE, 0 /* MAP_??? */, 12884901888, 0) = 0x15555cbc000 close(3) = 0 mprotect(0x15555a60000, 352256, PROT_READ|PROT_WRITE) = 0 mprotect(0x15555a60000, 352256, PROT_READ|PROT_EXEC) = 0 mprotect(0x1555594a000, 90112, PROT_READ|PROT_WRITE) = 0 fstat(1, {st_mode=S_IFREG|0664, st_size=3761, ...}) = 0 mmap(0, 4831832456, PROT_READ|PROT_WRITE, 0 /* MAP_??? */, 12884901888, 0) = 0x15555566000 write(1, "bad\n", 4bad ) = 4 munmap(0x15555566000, 8192) = 0 exit(4) = ? --------------1372500F2847-- -- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com