diff options
| author | John Polstra <jdp@FreeBSD.org> | 1999-08-30 01:50:41 +0000 |
|---|---|---|
| committer | John Polstra <jdp@FreeBSD.org> | 1999-08-30 01:50:41 +0000 |
| commit | 7360ae0f2acb7fa766214a14cd977fd6eb728d05 (patch) | |
| tree | 0808a970936fd15eb212ddecd2a32443ba2fb735 /libexec/rtld-elf/map_object.c | |
| parent | 926ea445fef0e4e13bf7e0652efb4b28c002ff22 (diff) | |
Notes
Diffstat (limited to 'libexec/rtld-elf/map_object.c')
| -rw-r--r-- | libexec/rtld-elf/map_object.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libexec/rtld-elf/map_object.c b/libexec/rtld-elf/map_object.c index 42cb3e52dba2..ca353c7533fd 100644 --- a/libexec/rtld-elf/map_object.c +++ b/libexec/rtld-elf/map_object.c @@ -27,6 +27,7 @@ #include <sys/param.h> #include <sys/mman.h> +#include <sys/stat.h> #include <errno.h> #include <stddef.h> @@ -47,7 +48,7 @@ static int protflags(int); /* Elf flags -> mmap protection */ * for the shared object. Returns NULL on failure. */ Obj_Entry * -map_object(int fd, const char *path) +map_object(int fd, const char *path, const struct stat *sb) { Obj_Entry *obj; union { @@ -228,6 +229,10 @@ map_object(int fd, const char *path) } obj = obj_new(); + if (sb != NULL) { + obj->dev = sb->st_dev; + obj->ino = sb->st_ino; + } obj->mapbase = mapbase; obj->mapsize = mapsize; obj->textsize = round_page(segs[0]->p_vaddr + segs[0]->p_memsz) - |
