diff options
| author | Ulrich Drepper <[email protected]> | 2005-09-02 20:01:37 +0000 |
|---|---|---|
| committer | Ulrich Drepper <[email protected]> | 2005-09-02 20:01:37 +0000 |
| commit | 618795fbfd64f2dd1fa4375ce704736c70725412 (patch) | |
| tree | 2907d262bfb705d048a0a11ecd4804f8d938f49e /src | |
| parent | 1d9381086f065a7048771f7f3411aae65b8e177f (diff) | |
Don't use mmap when _MUDFLAP is defined.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 1 | ||||
| -rw-r--r-- | src/strings.c | 14 |
2 files changed, 12 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 770dac82..66b09544 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,7 @@ 2005-09-02 Ulrich Drepper <[email protected]> * strings.c (main): Reset elfmap variable afte rmunmap call. + [_MUDFLAP] (map_file): Simplify mudflap debugging by not using mmap. 2005-08-28 Ulrich Drepper <[email protected]> diff --git a/src/strings.c b/src/strings.c index 40774e46..d9434c92 100644 --- a/src/strings.c +++ b/src/strings.c @@ -448,15 +448,22 @@ process_chunk (const char *fname, const unsigned char *buf, off64_t to, static void * map_file (int fd, off64_t start_off, off64_t fdlen, size_t *map_sizep) { +#if _MUDFLAP + (void) fd; + (void) start_off; + (void) fdlen; + (void) map_sizep; + return MAP_FAILED; +#else /* Maximum size we mmap. We use an #ifdef to avoid overflows on 32-bit machines. 64-bit machines these days do not have usable address spaces larger than about 43 bits. Not that any file should be that large. */ -#if SIZE_MAX > 0xffffffff +# if SIZE_MAX > 0xffffffff const size_t mmap_max = 0x4000000000lu; -#else +# else const size_t mmap_max = 0x40000000lu; -#endif +# endif /* Try to mmap the file. */ size_t map_size = MIN ((off64_t) mmap_max, fdlen); @@ -489,6 +496,7 @@ map_file (int fd, off64_t start_off, off64_t fdlen, size_t *map_sizep) *map_sizep = map_size; return mem; +#endif } |
