diff options
| author | Konstantin Belousov <kib@FreeBSD.org> | 2012-03-14 15:39:59 +0000 |
|---|---|---|
| committer | Konstantin Belousov <kib@FreeBSD.org> | 2012-03-14 15:39:59 +0000 |
| commit | 6fea10fb9f8dc537044db93c109592422ec2a863 (patch) | |
| tree | 6cb1f7004b97ad903055090950327ef825b31f96 /libexec/rtld-elf/map_object.c | |
| parent | a9e7383c181cc03b018acbb9fa21eedaf8a787b1 (diff) | |
Notes
Diffstat (limited to 'libexec/rtld-elf/map_object.c')
| -rw-r--r-- | libexec/rtld-elf/map_object.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libexec/rtld-elf/map_object.c b/libexec/rtld-elf/map_object.c index f142819f261a..9f4a499912b5 100644 --- a/libexec/rtld-elf/map_object.c +++ b/libexec/rtld-elf/map_object.c @@ -184,7 +184,7 @@ map_object(int fd, const char *path, const struct stat *sb) MAP_NOCORE, -1, 0); if (mapbase == (caddr_t) -1) { _rtld_error("%s: mmap of entire address space failed: %s", - path, strerror(errno)); + path, rtld_strerror(errno)); return NULL; } if (base_addr != NULL && mapbase != base_addr) { @@ -204,7 +204,8 @@ map_object(int fd, const char *path, const struct stat *sb) data_flags = convert_flags(segs[i]->p_flags) | MAP_FIXED; if (mmap(data_addr, data_vlimit - data_vaddr, data_prot, data_flags, fd, data_offset) == (caddr_t) -1) { - _rtld_error("%s: mmap of data failed: %s", path, strerror(errno)); + _rtld_error("%s: mmap of data failed: %s", path, + rtld_strerror(errno)); return NULL; } @@ -221,7 +222,7 @@ map_object(int fd, const char *path, const struct stat *sb) if ((data_prot & PROT_WRITE) == 0 && -1 == mprotect(clear_page, PAGE_SIZE, data_prot|PROT_WRITE)) { _rtld_error("%s: mprotect failed: %s", path, - strerror(errno)); + rtld_strerror(errno)); return NULL; } @@ -240,7 +241,7 @@ map_object(int fd, const char *path, const struct stat *sb) if (mmap(bss_addr, bss_vlimit - bss_vaddr, data_prot, data_flags | MAP_ANON, -1, 0) == (caddr_t)-1) { _rtld_error("%s: mmap of bss failed: %s", path, - strerror(errno)); + rtld_strerror(errno)); return NULL; } } @@ -307,7 +308,7 @@ get_elf_header (int fd, const char *path) ssize_t nbytes; if ((nbytes = pread(fd, u.buf, PAGE_SIZE, 0)) == -1) { - _rtld_error("%s: read error: %s", path, strerror(errno)); + _rtld_error("%s: read error: %s", path, rtld_strerror(errno)); return NULL; } |
