projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
don't fail to map library/executable with zero-length segment maps
[musl]
/
ldso
/
dynlink.c
diff --git
a/ldso/dynlink.c
b/ldso/dynlink.c
index
6b868c8
..
aaadcce
100644
(file)
--- a/
ldso/dynlink.c
+++ b/
ldso/dynlink.c
@@
-579,6
+579,7
@@
static void *mmap_fixed(void *p, size_t n, int prot, int flags, int fd, off_t of
{
static int no_map_fixed;
char *q;
+ if (!n) return p;
if (!no_map_fixed) {
q = mmap(p, n, prot, flags|MAP_FIXED, fd, off);
if (!DL_NOMMU_SUPPORT || q != MAP_FAILED || errno != EINVAL)