Browse Prior Art Database

User Space Loader

IP.com Disclosure Number: IPCOM000123618D
Original Publication Date: 1999-Feb-01
Included in the Prior Art Database: 2005-Apr-05
Document File: 4 page(s) / 151K

Publishing Venue

IBM

Related People

Peckham, SB: AUTHOR

Abstract

Disclosed is a new method for loading and relocating a program so that it can be executed. The method relies on a "user-space loader", which is code that is loaded in the address space of all programs. The kernel performs all privileged operations needed to load a new process image, including mapping the program and its dependent libraries into read-only memory. The user-space loader completes the operation by creating symbol tables for the loaded modules and performing symbol relocation. The user-space loader completes the operation without making any system calls. When the loader is finished, the entry point of the program is called directly.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 45% of the total text.

User Space Loader

   Disclosed is a new method for loading and relocating a
program so that it can be executed.  The method relies on a
"user-space loader", which is code that is loaded in the address
space of all programs.  The kernel performs all privileged
operations needed to load a new process image, including mapping the
program and its dependent libraries into read-only memory.  The
user-space loader completes the operation by creating symbol tables
for the loaded modules and performing symbol relocation.  The
user-space loader completes the operation without making any system
calls.  When the loader is finished, the entry point of the program
is called directly.

   On many computer systems, including AIX,* loading a new
program for execution requires privileged operations.  On some
systems, all of the required processing is performed by the
operating system kernel, and when control is transferred to user
space, the program begins executing immediately.  On other systems,
the kernel transfers control to user-space code (the "user-space
loader"), which loads and initializes the program.  In order to load
the program into memory, the user-space loader on these systems must
make a system call.  Similarly, if the program depends on any shared
objects, the user-space loader must make additional system calls to
get all the necessary shared objects loaded.

   The solution described in this disclosure is a hybrid of
the two approaches used in other systems.   The operating system
kernel loads into memory the main program and all its dependent
shared objects.  Control is transferred to the user-space loader,
which is always loaded in memory.  The user-space loader completes
the initialization of the process image by performing symbol
resolution and relocation.  This solution is novel in that no system
calls are made by the user-space loader, except if errors occur
during symbol resolution.  Once the user-space loader is invoked, all
necessary modules are in read-only memory.  (Note: A "module" is an
entity that can be loaded into a process's
address space.   A module can be either a program, a shared
library loaded automatically when a program is loaded, or a
dynamically loaded object loaded with a system call.)  The
user-space loader performs symbol resolution and relocation without
any kernel assistance.

   This technique is used to load 64-bit programs on AIX
4.3.  Since the user-space loader runs in the context of the 64-bit
program it has addressability to the full 64-bit address space of the
program, and a straightforward symbol relocation algorithm can be
used.  That is, the same algorithm that the 32-bit kernel uses to
relocate 32-bit processes can be used.

   A user-space loader has the same privileges as the program
that is being loaded.  Therefore, the user-space loader must not be
allowed to use unlimited amounts of memory.  Otherwise, the program
itself could circumvent the system resource limits on...