lkml.org 
[lkml]   [2000]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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/

\
 
 \ /
  Last update: 2005-03-22 13:56    [W:0.030 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site