lkml.org 
[lkml]   [2004]   [Feb]   [10]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
    /
    DateTue, 10 Feb 2004 17:37:38 +0000
    FromJamie Lokier <>
    SubjectRe: [BUG] get_unmapped_area() change -> non booting machine
    Linus Torvalds wrote:
    > What I find strange is that bash passed in something else than NULL as the 
    > argument in the first place. Doing a quick trace of my bash executable 
    > shows non-NULL hints only for MAP_FIXED mmap's. So what triggered this? 
    
    Run the "prelink" program on your system.
    
    It's not bash which is using non-NULL hints, it's ld.so.  Prelinked
    libraries have relocations already resolved on the assumption that
    they are mapped at a known address.  (Prelink chooses a different
    address for each library).  ld.so calls mmap() with that address.
    
    If the library cannot be mapped at the requested address, then ld.so
    has to do dynamic linking as usual, dirtying some pages and looking up
    symbols.
    
    The real question is - why does malloc() break?  I'd expect malloc()
    to use MAP_ANON these days, when brk() fails.  But it seems not.
    
    -- Jamie
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    
    
    \
     
     \ /
      Last update: 2005-03-22 13:00    [from the cache]
    ©2003-2008