This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
static or not static ...
- From: "Gian Lorenzo Meocci" <glmeocci at gmail dot com>
- To: libc-alpha at sourceware dot org
- Date: Wed, 12 Mar 2008 17:08:33 +0100
- Subject: static or not static ...
Hi,
I have compiled successfully program with -static and in fact if I try
ldd I obtain:
meox@ciop:~/mysql_normal/bin$ ldd mysqlshow
not a dynamic executable
But if I run it with strace I see this:
....
open("/home/meox/myglibc//lib/libnss_files.so.2", O_RDONLY) = 4
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340\30"..., 512) = 512
fstat64(4, {st_mode=S_IFREG|0755, st_size=158990, ...}) = 0
old_mmap(NULL, 41624, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE,
4, 0) = 0xb7f51000
old_mmap(0xb7f5a000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x8000) = 0xb7f5a000
close(4) = 0
open("/home/meox/myglibc//lib/libc.so.6", O_RDONLY) = 4
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\200e\1"..., 512) = 512
fstat64(4, {st_mode=S_IFREG|0755, st_size=7449960, ...}) = 0
...
How is possible that the program open libc.so??? And WHY???
Thanks,
--
Gian Lorenzo Meocci
http://www.meocci.it