Messages in this thread | | | Date | Mon, 21 Feb 2000 02:44:17 -0500 (EST) | From | Ricky Beam <> | Subject | Re: mmap question |
| |
On Mon, 21 Feb 2000, Lee Chin wrote: >If I statically link my program, can I tell mmap to map at 0x40000000 ? >I have a program that when I mmap at this address (after statically linking) >I see memory corruption. Since its statically linked, I shouldnt see any >libraries here right?
That depends on how static your "static" program is... even though ldd may say the program is statically linked, glibc programs are almost never fully static due to the (stupid in my opinion) name service switch logic dynamically loading libraries at run-time that were never referenced at compile time. (Solaris does something similar, but then Sun doesn't support fully static binaries anyway.)
Use strace to watch what your program is actually doing. My bet is some libnss_*.so thing is overloading your mmap()ed area.
--Ricky
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |