From 6d9756c910a07bb353af4d6908f88c1ddea15916 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 9 Jun 1996 22:02:59 +0000 Subject: * elf/dl-load.c (_dl_map_object_from_fd): Close FD before return. * sysdeps/mach/mprotect.c: Define with __ name and weak alias. * sysdeps/stub/mprotect.c: Likewise. * sysdeps/unix/mman/syscalls.list (mprotect): Likewise. * sysdeps/generic/sys/mman.h: Declare __mprotect. * sysdeps/unix/sysv/irix4/sys/mman.h: Likewise. * sysdeps/unix/sysv/linux/sys/mman.h: Likewise. * sysdeps/unix/bsd/sun/sunos4/sys/mman.h: Likewise. * sysdeps/unix/bsd/osf/sys/mman.h: Likewise. --- elf/dl-load.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'elf') diff --git a/elf/dl-load.c b/elf/dl-load.c index 1625d3cf5b..8103c7af2a 100644 --- a/elf/dl-load.c +++ b/elf/dl-load.c @@ -430,6 +430,9 @@ _dl_map_object_from_fd (const char *name, int fd, char *realname) } } + /* We are done mapping in the file. We no longer need the descriptor. */ + __close (fd); + l->l_type = type == ET_EXEC ? lt_executable : lt_library; if (l->l_ld == 0) -- cgit v1.2.3