summaryrefslogtreecommitdiffstats
path: root/libexec/rtld-elf/map_object.c
diff options
context:
space:
mode:
Diffstat (limited to 'libexec/rtld-elf/map_object.c')
-rw-r--r--libexec/rtld-elf/map_object.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/libexec/rtld-elf/map_object.c b/libexec/rtld-elf/map_object.c
index f142819..9f4a499 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;
}
OpenPOWER on IntegriCloud