This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/11767] New: RFE: dlopen of in-memory ET_DYN or ET_EXEC object


Request For Enhancement (RFE): Please implement some way to add an ELF object
(ET_DYN or ET_EXEC) that already is in memory, into the set of modules that are
managed by the runtime loader rtld, instead of requiring dlopen() of a file from
the filesystem.  This capability is useful for managing modules that are created
at runtime, and/or to help implement protection and access controls, etc.

Here is a suggestion of syntax and semantics: a new function
   #include <link.h>  /* macro-ize Elf32_Xxx vs. Elf64_Xxx */
   void *handle = dlopen_phdr(ElfW(Phdr) const *phdr, int n_phdr, int flag);
which is much like dlopen() except that the mmap()s already have been done
before calling dlopen_phdr().  The "slide" value (adjustment in load address)
may be computed from the difference between the input phdr parameter and the
PT_PHDR.p_vaddr that is found in the vector of ElfW(Phdr)s.

-- 
           Summary: RFE: dlopen of in-memory ET_DYN or ET_EXEC object
           Product: glibc
           Version: 2.12
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: jreiser at BitWagon dot com
                CC: glibc-bugs at sources dot redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=11767

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]