From patchwork Mon Mar 4 16:56:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 31709 Received: (qmail 48455 invoked by alias); 4 Mar 2019 16:56:40 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 48442 invoked by uid 89); 4 Mar 2019 16:56:39 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Signal, device, showing X-HELO: mx1.redhat.com From: Florian Weimer To: libc-alpha@sourceware.org Subject: [PATCH] elf: Remove remnants of MAP_ANON emulation Date: Mon, 04 Mar 2019 17:56:35 +0100 Message-ID: <871s3mlgsc.fsf@oldenburg2.str.redhat.com> MIME-Version: 1.0 Most of the code was removed in commit 20739e5454c12acbc0479387fe795c5b19a4166f ("* elf/dl-load.c: Remove support for systems without MAP_ANON."). 2019-03-04 Florian Weimer * sysdeps/generic/ldsodefs.h (_dl_sysdep_open_zero_fill): Remove declaration. * elf/dl-load.c (_dl_map_object_from_fd): Assume MAP_ANON is defined. diff --git a/elf/dl-load.c b/elf/dl-load.c index 0e759cf8ca..2bbef81b6e 100644 --- a/elf/dl-load.c +++ b/elf/dl-load.c @@ -947,21 +947,6 @@ _dl_map_object_from_fd (const char *name, const char *origname, int fd, /* This is the ELF header. We read it in `open_verify'. */ header = (void *) fbp->buf; -#ifndef MAP_ANON -# define MAP_ANON 0 - if (_dl_zerofd == -1) - { - _dl_zerofd = _dl_sysdep_open_zero_fill (); - if (_dl_zerofd == -1) - { - free (realname); - __close_nocancel (fd); - _dl_signal_error (errno, NULL, NULL, - N_("cannot open zero fill device")); - } - } -#endif - /* Signal that we are going to add new objects. */ if (r->r_state == RT_CONSISTENT) { diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h index 37cab6f06b..a7f6b82da6 100644 --- a/sysdeps/generic/ldsodefs.h +++ b/sysdeps/generic/ldsodefs.h @@ -689,10 +689,6 @@ rtld_hidden_proto (_dl_starting_up) /* Random data provided by the kernel. */ extern void *_dl_random attribute_hidden attribute_relro; -/* OS-dependent function to open the zero-fill device. */ -extern int _dl_sysdep_open_zero_fill (void); /* dl-sysdep.c */ - - /* Write message on the debug file descriptor. The parameters are interpreted as for a `printf' call. All the lines start with a tag showing the PID. */