X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=src%2Fldso%2Fdynlink.c;h=527b36bd12cdc6c01764e7a6cf79e470300d4d2a;hp=82aaeec19eed8c1c9cdf0a8d8244b3f1cb8e0205;hb=bf30100ad7e208dbac5835b38881c98ceb5b928f;hpb=c7debe13ee3c1ca2039b67bb7e4891365017ac1a diff --git a/src/ldso/dynlink.c b/src/ldso/dynlink.c index 82aaeec1..527b36bd 100644 --- a/src/ldso/dynlink.c +++ b/src/ldso/dynlink.c @@ -189,7 +189,7 @@ static void *map_library(int fd, size_t *lenp, unsigned char **basep, size_t *dy * the length of the file. This is okay because we will not * use the invalid part; we just need to reserve the right * amount of virtual address space to map over later. */ - map = mmap(0, map_len, prot, MAP_PRIVATE, fd, off_start); + map = mmap((void *)addr_min, map_len, prot, MAP_PRIVATE, fd, off_start); if (map==MAP_FAILED) return 0; base = map - addr_min; ph = (void *)((char *)buf + eh->e_phoff);