From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23329 invoked by alias); 18 Jul 2012 14:00:26 -0000 Received: (qmail 23304 invoked by uid 22791); 18 Jul 2012 14:00:24 -0000 X-SWARE-Spam-Status: No, hits=-3.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from localhost (HELO sourceware.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 18 Jul 2012 14:00:12 +0000 From: "bugdal at aerifal dot cx" To: glibc-bugs@sources.redhat.com Subject: [Bug dynamic-link/11767] RFE: dlopen of in-memory ET_DYN or ET_EXEC object Date: Wed, 18 Jul 2012 14:00:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: dynamic-link X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: bugdal at aerifal dot cx X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: drepper.fsp at gmail dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: CC Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org X-SW-Source: 2012-07/txt/msg00148.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=11767 Rich Felker changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugdal at aerifal dot cx --- Comment #3 from Rich Felker 2012-07-18 13:59:57 UTC --- If you want to embed the .so's in the main program binary, why are you not just static linking them to begin with? That will give much better performance (no time wasted on relocations, no PIC overhead, etc.) and make your program more portable (no dependence on glibc-specific dynamic loading features or even on POSIX dlopen). With that said, I really question the validity of this feature request. Using the .so in-place from data embedded in the main program would only be possible if it's page-aligned, and would be a security risk anyway since the whole .so image would be writable, thus requiring write+exec permission on the pages that most security-enhanced systems don't even allow these days. Thus you'd have to make a copy of the whole .so image, and the copy would have to be anonymous memory that consumes actual physical runtime memory and commit charge, rather than being a file-backed mapping. In other words, it wastes a good deal more memory than loading a .so from a separate file. -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.