Fact-checked by Grok 2 weeks ago

Position-independent code

Position-independent code (PIC) is a form of designed to execute correctly regardless of its absolute location in , relying on relative addressing, tables, and dynamic mechanisms rather than hardcoded absolute es. This allows the code to be loaded and run at any without requiring runtime modifications or relocations, distinguishing it from position-dependent code that assumes a fixed loading . PIC is primarily used to enable efficient sharing of code across multiple processes, as in shared libraries and dynamic linkers, where the same can be mapped once and referenced by many programs simultaneously. It supports key system features such as (PIE), which extend these benefits to entire programs, and (ASLR), a measure that randomizes layouts to hinder exploitation of vulnerabilities. In modern operating systems like those based on (), PIC facilitates modular software design, including loadable modules and optimized handling of read-only text segments. Compilers such as and generate PIC through specific flags: in , -fPIC produces unrestricted position-independent code suitable for shared objects using a global offset table (GOT) for address resolution, while -fpic imposes machine-specific limits on GOT entries for smaller binaries; analogous options -fPIE and -fpie apply to executables. mirrors this with -fPIC for shared libraries and -fPIE for executables, ensuring compatibility with dynamic loaders that resolve external references at startup. On architectures like , PIC employs PC-relative accesses or static base registers to maintain fixed offsets between code and data, supporting scenarios from embedded systems to full OS environments. Overall, PIC enhances by minimizing relocation overhead and promotes secure, flexible .

Fundamentals

Definition and Principles

Position-independent code (PIC) refers to that can be loaded and executed at any arbitrary without requiring any modifications to the code itself. This contrasts with position-dependent code, also known as absolute code, which embeds fixed, hardcoded es that assume a specific load , necessitating adjustments if relocated. The core principle of PIC relies on relative addressing modes, where instructions reference targets using offsets from the current position rather than absolute locations. For instance, (PC)-relative addressing computes effective addresses by adding a signed offset to the value of the (the address of the current instruction plus a small increment), enabling branches, jumps, and data accesses to remain valid regardless of the base load address. This approach avoids embedding absolute addresses in the instruction stream, allowing the code to support into non-contiguous memory regions and facilitating efficient sharing across multiple processes. PIC is particularly useful for shared libraries, as it permits a single instance of the library code to be mapped into different processes' address spaces at varying virtual addresses. A simple example in x86 illustrates the difference: a relative like jmp [label](/page/Label) encodes the to the as an offset from the instruction's position (e.g., +10 bytes ahead), making it position-independent, whereas an absolute like jmp 0x400000 directly specifies a fixed , rendering it position-dependent and requiring relocation if moved. Unlike relocatable code, which can be moved but requires runtime or link-time modifications via a relocation table to update embedded addresses, PIC demands no such adjustments for the code section itself, though data references may still need resolution.

Benefits and Challenges

Position-independent code (PIC) offers several key advantages in software design, particularly in environments requiring flexibility and resource efficiency. One primary benefit is its support for efficient shared libraries, where the same code can be loaded and executed at different memory addresses across multiple processes without modification, thereby reducing overall memory usage by allowing read-only code segments to be shared in physical memory. This sharing eliminates the need for private copies of the text segment in each process, minimizing swap space reservations and improving system-wide memory efficiency. Additionally, PIC facilitates dynamic loading of modules, such as plugins, by enabling code to be relocated at runtime without fixed address dependencies, which is essential for modular systems like loadable libraries in embedded or extensible applications. Another significant advantage is enhanced portability, as PIC allows code to be executed from any valid memory location, making it suitable for embedded systems or virtualized environments where address layouts may vary. For instance, in bare-metal embedded targets, self-relocating executables can be loaded dynamically without hardware-specific adjustments. Furthermore, PIC underpins security features like (ASLR), which randomizes the base addresses of executables and libraries to mitigate exploits such as by making memory layouts unpredictable. Despite these benefits, PIC introduces notable challenges, primarily related to and overhead. The use of indirect addressing mechanisms, such as global offset tables for and procedure linkage tables for calls, imposes a penalty due to additional accesses and pressure, particularly in with frequent branches or jumps. On 32-bit x86 architectures, this can result in up to % performance degradation in some benchmarks with an arithmetic average of 10%, though the impact is negligible on 64-bit systems like x86_64 or AArch64. Additionally, generating PIC often increases code size because relative references and structures replace direct absolute addressing, leading to larger binaries in some cases. While startup-time overhead from relocations is another concern, it is generally minor compared to effects in branch-intensive applications.

Implementation Techniques

Code Relocation Strategies

Code relocation strategies enable executable code to operate correctly regardless of its load in memory, primarily through the use of relative addressing that avoids embedding absolute addresses in instructions. These techniques ensure that branches, calls, and loads within the reference locations via offsets from the current (PC), allowing the entire code block to be relocated without modification. Relative addressing modes form the foundation of these strategies, where instructions compute target addresses by adding a signed offset to the PC value at the time of execution. For instance, in architecture, PC-relative branches and calls use 32-bit relative offsets, while loads and stores leverage RIP-relative addressing, introduced in the Intel 64 architecture to simplify position-independent code generation by treating the instruction pointer (RIP) as the base register for memory accesses. This mode encodes the offset directly in the instruction, enabling efficient access to nearby code or constants without absolute addresses, and supports up to ±2^31 bytes displacement. Similarly, absolute jumps are avoided by using relative instructions such as CALL rel32, where the offset is encoded statically by the assembler relative to the instruction location. Compilers play a central role in implementing these strategies through targeted code generation flags that enforce relative addressing. In GCC and Clang, the -fPIC flag instructs the compiler to produce position-independent code by favoring PC-relative instructions for branches, calls, and data accesses within the code segment, while deferring absolute references to runtime resolution where necessary. For PIC-compliant jumps in inline assembly, developers use relative opcodes like the x86 CALL rel32, which specifies a relative displacement from the current instruction pointer. These offsets are resolved at link time, ensuring the code remains valid after relocation. Architecture-specific optimizations further refine these techniques to align with capabilities. In architectures, such as ARMv8-A, relative branches employ PC-relative addressing modes in load/ instructions and branch operations, where the offset is added to the PC to reach targets within a 26-bit signed range for B and BL instructions, facilitating position-independent execution in Thumb or modes. For , position-independent instructions rely on the AUIPC (Add Upper Immediate to PC) paired with load/ or instructions; AUIPC adds a 20-bit immediate (shifted left by 12 bits) to the current PC and stores the result in a register, enabling PC-relative addressing for jumps via JAL (Jump and Link) with its 20-bit PC-relative offset, supporting relocations up to ±1 MiB without absolute dependencies. These methods collectively ensure code segments remain self-contained and relocatable, often integrating briefly with data relocation mechanisms for full executables.

Data Relocation and Tables

In position-independent code (PIC), data relocation addresses the challenge of referencing global variables and functions without embedding absolute addresses, which would break when the code is loaded at different memory locations. The (GOT) serves as a key mechanism for this, functioning as an array of entries that store absolute addresses for global data and functions. Positioned in the data section of the executable or , the GOT is accessed via relative offsets from the code, allowing the runtime loader to patch these entries with actual addresses post-loading. This ensures that data references remain valid regardless of the load address, maintaining the read-only nature of the . Complementing the GOT for function calls is the Procedure Linkage Table (PLT), a series of stubs in the code section that enable indirect invocation of external functions without fixed addresses. Each PLT entry initially points to a resolver routine in the ; upon the first call, it triggers lazy binding, where the linker resolves the target function's address and updates the corresponding GOT entry. Subsequent calls then jump directly to the resolved address via the GOT, avoiding repeated resolution overhead. This setup supports efficient dynamic linking while preserving PIC properties, as the PLT uses relative addressing to access the GOT. The dynamic relocation process occurs primarily at load time, managed by the runtime loader, which processes relocation entries to adjust GOT contents. For each global symbol, the loader calculates the absolute address based on the library's load base and patches the relevant GOT slot— for instance, using relocation types like R_X86_64_GLOB_DAT for data or R_X86_64_JUMP_SLOT for functions. This one-time adjustment ensures all indirect references resolve correctly without modifying the code itself. In , GOT access typically involves PC-relative loading, such as the x86-64 instruction lea rax, [rip + GOT_offset], which computes the GOT's base address relative to the instruction pointer before adding a symbol-specific offset to reach the entry; the effective address is then dereferenced to obtain the target's value. Relative code addressing facilitates this table access by providing offsets from the current . PIC implementations distinguish between small and large models to optimize GOT usage based on constraints, particularly differing in 32-bit and 64-bit systems. In the small model, prevalent in 64-bit environments, the GOT is assumed to lie within a 32-bit from any code location, enabling direct PC-relative access without an explicit GOT base — for example, is loaded via mov rax, [rip + offset_to_got_entry]. This simplifies code and reduces instructions. Conversely, the large model, necessary for broader address ranges in 64-bit systems or certain 32-bit scenarios with extended addressing, requires establishing a GOT pointer in a (e.g., via a multi-instruction loading into rbx), followed by base-plus- addressing. The effective address calculation in this case follows the form: \text{Effective address} = \text{base_register} + \text{offset} where the base is the GOT pointer, accommodating 64-bit offsets for symbols potentially far from the code. These models balance and flexibility, with the small model favored for its efficiency in typical deployments.

Historical Evolution

Early Innovations

The development of position-independent (PIC) emerged in the as a response to the demands of early systems, which required efficient utilization and sharing among multiple users to minimize storage redundancy and enable concurrent access. In these systems, code needed to be relocatable to arbitrary locations without modification, driven by the need to diverse user workloads on limited resources. This motivation was particularly evident in pioneering projects aimed at creating multi-user environments, where static addressing would have hindered and sharing. Multics, initiated in 1965 by a collaboration between MIT's Project MAC (led by ), Bell Telephone Laboratories, and , introduced PIC through its segmented model to facilitate on the GE-645 computer, delivered in 1967. The consisted of up to 2^{14} segments, each up to 2^{18} 36-bit words, referenced via generalized addresses (segment number and word offset) that were location-independent. Procedure segments were designed as pure, non-self-modifying , allowing them to be loaded at arbitrary physical addresses and shared across processes without recompilation or relocation, a key enabler for its multi-user design serving remote terminals efficiently. Dynamic linking resolved symbolic references to these generalized addresses at , supported by software and descriptor tables. This approach reduced clutter by promoting reusable segments, aligning with the project's goal of an "information utility" for scalable computing. Similarly, 's Time Sharing System/360 (TSS/360), made available on a trial basis in 1967 for the System/360 Model 67, employed modules to support dynamic linking in a mainframe environment. Each routine maintained separate virtual constants (V-cons) for addresses and relocatable constants (R-cons) for data, stored in data segments; callers copied the appropriate R-con into a save area before , enabling the to execute regardless of its load . This brute-force method separated from position-dependent data, allowing shared modules to be loaded dynamically without per-process relocation, which was essential for concurrent task execution and resource sharing among programmer-users at terminals. Developed by to compete in multi-user , TSS/360's facilitated efficient mainframe utilization but remained experimental and unsupported as a product. Early PIC approaches, however, were constrained by their dependence on specialized hardware support, such as the GE-645's segmentation capabilities for or the Model 67's virtual addressing extensions for TSS/360, limiting portability across different architectures. These systems prioritized hardware-software integration for performance in controlled environments, laying groundwork for later, more generalized techniques.

Standardization in Modern OS

In the late 1980s, 4.x introduced position-independent code () as a core feature for shared libraries, enabling multiple processes to share the same code segments without requiring relocation at load time. This innovation, detailed in the seminal paper on SunOS shared libraries, relied on compiler-generated using flags like -pic, which produced relocatable references resolved by the runtime linker at process startup. The a.out format was extended with dedicated relocation tables to support this dynamic loading mechanism, marking an early formalization of in systems. The (ELF), developed and standardized by Unix System Laboratories in the early 1990s as part of the System V (ABI), established a comprehensive standard for across Unix variants. ELF explicitly defines relocation types tailored for position-independent code, such as R_386_PC32, which supports PC-relative addressing to compute symbol offsets without absolute addresses, facilitating efficient usage. This specification, first published in the (TIS), provided a unified structure for sections like .rel.dyn and .rela.plt, where PIC relocations are stored and processed by the . The shift from the a.out format to ELF during the 1990s significantly improved the portability of PIC implementations. Whereas a.out relied on ad-hoc vendor extensions for relocation data, often limiting interoperability, ELF's standardized relocation entries and segment mapping enabled consistent PIC support across diverse Unix architectures and vendors, streamlining dynamic linking and reducing compatibility issues in heterogeneous environments. Key milestones in ELF's adoption include the 1992 release of the initial specification, which was immediately integrated into 2.0 ( 5.0) for production use in shared libraries and executables. followed suit in the mid-1990s, with Linux libc 5 providing initial ELF support in 1995, the (glibc) achieving full support with version 2.0 in 1997, and full kernel support by version 1.2 in 1995, accelerating widespread PIC standardization in open-source Unix derivatives. In contrast to proprietary formats like COFF, which offered limited or architecture-specific relocation mechanisms, ELF's explicit PIC support—through dedicated types for global offset tables (GOT) and procedure linkage tables (PLT)—ensured greater flexibility and efficiency for relocatable code, promoting cross-platform adoption without custom modifications.

Applications in Operating Systems

Unix-like Systems

In Unix-like systems, position-independent code (PIC) is primarily implemented through the Executable and Linkable Format (ELF), which serves as the foundation for dynamic linking. In Linux distributions, the GNU Compiler Collection (GCC) enables PIC generation via the -fPIC flag during compilation, producing code that accesses global data and functions through a Global Offset Table (GOT) and Procedure Linkage Table (PLT). These tables allow relocations to be resolved at runtime by the dynamic linker ld.so, avoiding fixed addresses and supporting load-time address randomization. Shared object files (.so) in leverage to facilitate memory-efficient sharing across multiple processes, as the code can be loaded at varying virtual addresses without per-process relocation. For instance, a typical compilation workflow using involves first compiling source files with position independence: gcc -fPIC -c example.c, followed by linking into a : gcc -shared -o libexample.so example.o. The resulting .so file contains deferred relocations that ld.so processes upon loading, updating GOT entries for data accesses and PLT stubs for function calls. Solaris implements PIC within the ELF framework using architecture-specific relocation types, such as R_AMD64_GOTPCREL for instruction-pointer-relative GOT addressing and R_AMD64_PLT32 for PLT-based procedure calls, enabling efficient dynamic linking in shared objects. These relocations differ from standard ELF by incorporating extensions for and x64 architectures, optimizing for Solaris's runtime environment while maintaining compatibility with generic ELF tools. FreeBSD adopts standard ELF relocations for PIC in shared libraries, with the ld-elf.so.1 dynamic linker handling GOT and PLT resolutions similar to , though it includes BSD-specific variations like optimized support and stricter validation of ELF headers for security. This approach ensures seamless integration with FreeBSD's ports system, where PIC is mandatory for dynamic libraries to support . In macOS, a system based on , PIC is supported through the Mach-O executable format for shared libraries (.dylib files) and frameworks. The dynamic linker dyld resolves symbols at load time using techniques like relative addressing with @rpath paths and a dynamic loader environment, enabling code sharing and ASLR without fixed addresses. Compilers like generate PIC code by default for shared objects via flags such as -dynamiclib, integrating with build tools for modular app development. Shared libraries have long been compiled with by default in -based toolchains. For enhanced security, many contemporary distributions, including since version 16.10 on architectures like amd64, default to position-independent executables () via flags like -fPIE, promoting features like and reducing relocation overhead, often set implicitly by build tools such as dpkg-buildflags. For performance tuning, offers -fpic as an alternative to -fPIC for scenarios with limited global references, generating smaller code by assuming a GOT size under 64 KB (e.g., on x86), though -fPIC is preferred for larger libraries to avoid runtime errors from GOT overflow.

Windows Systems

In Windows operating systems, dynamic-link libraries (DLLs) serve as the primary units for position-independent code, allowing them to be loaded at varying base addresses across different processes to support memory sharing and (ASLR). Unlike static linking, DLLs enable by resolving external dependencies at through the Import Address Table (IAT), a in the (PE) format that the loader populates with actual function addresses from dependent modules. This mechanism facilitates relocation without requiring the DLL's code to be recompiled, though it relies on the loader to adjust references if the preferred load address is unavailable. The PE file format supports this through base relocations, a table in the optional header that lists offsets requiring adjustment when the image is loaded away from its preferred base address. At load time, the Windows loader applies these fixups to code and data pointers, making the DLL operational at the new location. This approach contrasts with the Global Offset Table (GOT) mechanism, where position-independent code often uses runtime indirection for symbol resolution, leading to direct addressing in Windows post-relocation but with load-time processing overhead for extensive fixups. To compile DLLs compatible with ASLR and position-independent loading, developers use the /DYNAMICBASE linker flag in Microsoft Visual C++ (MSVC), which sets the dynamic base flag in the PE header and generates necessary relocation information. For example, a DLL might export functions using __declspec(dllexport) (e.g., extern "C" __declspec(dllexport) int Add(int a, int b) { return a + b; }), while an executable imports them via __declspec(dllimport) and the IAT, allowing seamless linking without hardcoded addresses. DLLs were introduced in in 1985 as a means to share code and resources efficiently in 16-bit environments, evolving significantly with the shift to 32-bit in and further with 64-bit architectures in (2001), where RIP-relative addressing enabled more efficient position-independent code without as many relocations for instructions. A key limitation in Windows is that main executables () have traditionally not been compiled as position-independent, relying on a fixed base address unless explicitly enabled with flags like /DYNAMICBASE, in contrast to position-independent executables () that are more routinely supported. This design prioritizes load-time optimization for primary images but can complicate ASLR implementation for standalone applications.

Advanced Topics

Position-Independent Executables

Position-independent executables (PIE) extend position-independent code (PIC) principles to the main program binary, compiling the entire —code, , and dependencies—as relocatable, allowing it to load at any random base address without fixed assumptions about its location in memory. This contrasts with traditional position-dependent executables, which are linked to a specific load address and cannot be relocated without modification. PIE enables full (ASLR) for the executable itself, randomizing not only libraries and but also the program's text and data segments. To generate a binary, compilers like use the -pie linker flag alongside PIC options such as -fPIE, producing an file with type ET_DYN (shared object) rather than the conventional ET_EXEC (). For instance, the command gcc -fPIE -pie main.c -o main creates a PIE executable. Analysis with tools like readelf confirms this: running readelf -h main displays "Type: DYN (Shared object file)" in the header, indicating its relocatable nature, while a non-PIE shows "Type: EXEC (Executable file)." In , the execve invokes the dynamic linker (ld.so), which loads the PIE binary into a randomized region, applying an offset based on the kernel's ASLR configuration to prevent predictable addressing. Adoption of PIE has grown for security hardening, becoming the default in major distributions to enable comprehensive ASLR. Fedora enabled PIE by default for all packages starting with Fedora 23 in 2015, applying it across architectures with exceptions for performance-critical components. Ubuntu introduced default PIE compilation starting in Ubuntu 16.10 (Yakkety Yak) for amd64, ppc64el, and s390x architectures. Compared to PIC shared libraries, which relocate only relative to the program's base, PIE requires relocating the entire , including global offsets and GOT/PLT entries, leading to higher initial load-time overhead from additional dynamic relocations—averaging about 16% performance impact on startup (though absolute times are minimal, ranging from 0.2 to 11 ms) but negligible at . This enhances by randomizing the executable's base address, making it harder for attackers to predict code locations for exploits like .

Security Implications

Position-independent code (PIC) and its variant, position-independent executables (PIE), play a crucial role in integrating with (ASLR), a defense mechanism that randomizes the loading addresses of program code, libraries, stack, and heap to defeat memory corruption exploits like buffer overflows. Without PIC/PIE, executables are bound to fixed base addresses, allowing attackers to predict and target specific memory locations for payload injection or control hijacking. PIE extends this to the main executable itself, enabling full randomization across the address space and significantly increasing the entropy available for ASLR implementations. This randomization directly mitigates advanced exploit techniques such as Return-Oriented Programming (ROP), where attackers chain short sequences of existing instructions (gadgets) to execute arbitrary code while evading data execution prevention. Unpredictable base addresses from PIC/PIE scatter gadget locations, forcing attackers to rely on information leaks for partial address recovery, which modern systems counter with additional controls like pointer authentication. Studies have shown that even without leaks, ASLR with PIC/PIE reduces the effectiveness of code-reuse attacks, though sophisticated bypasses like just-in-time gadget synthesis have emerged, underscoring the value of layered defenses. PIC also supports secure code generation in just-in-time (JIT) compilers, such as those powering JavaScript engines in browsers, by producing relocatable machine code that aligns with ASLR without fixed dependencies, thereby preventing attackers from exploiting predictable JIT output for or spraying. In security tools, PIC enables the creation of portable for tasks like testing, allowing self-relocating payloads to execute reliably across diverse environments without hardcoded addresses. Post-2010, PIE adoption has proliferated in mobile ecosystems for defense-in-depth, with mandating PIE binaries since iOS 4.3 to enable robust ASLR and thwart return-to-libc attacks, while introduced PIE support in version 4.1 and required it for system apps by Android 5.0, reducing exploit success rates in constrained environments like smartphones. Browsers such as and similarly enforce PIE for renderer processes to isolate potential breaches. Despite these benefits, PIC/PIE carries rare risks of relocation failures from address collisions during loading in memory-limited scenarios, though contemporary operating systems employ fallback mechanisms to resolve such conflicts effectively.

References

  1. [1]
    Clang command line argument reference - LLVM
    This page lists the command line arguments currently supported by the GCC-compatible clang and clang++ drivers.
  2. [2]
    Support for Position Independent code - Arm Developer
    Position Independent (PI) code permits an executable to be loaded at an address that is different from the static link time address.
  3. [3]
    Position-Independent Code (Linker and Libraries Guide)
    The compiler can generate position-independent code under the -K pic option. Whereas the code within a dynamic executable is usually tied to a fixed address in ...
  4. [4]
    Code Gen Options (Using the GNU Compiler Collection (GCC))
    Position-independent code requires special support, and therefore works only on certain machines. For the x86, GCC supports PIC for System V but not for the Sun ...
  5. [5]
    HP-UX Linker and Libraries User's Guide - filibeto.org
    Hence the term position-independent code. Position independence is achieved by two mechanisms: First, PC-relative addressing is used wherever possible for ...
  6. [6]
    Lecture 7, Object Codes, Loaders and Linkers - University of Iowa
    ... relative addressing. If the machine code or the user ... Machines that allow programs to be written this way are said to support position independent code.
  7. [7]
    Linking and Shared Libraries - Cornell: Computer Science
    ... relative addressing , which means that the call instruction and its target ... Position-independent code. Many early computer systems lacked the ...
  8. [8]
    [PDF] ECE 152 - Computer Architecture - Duke People - Duke University
    x86 code. Effect on x86. Add registers add $1, $2 ... jmp label. PC = label. Function call jal label. $ra ... • Position-independent code via indirect jumps.
  9. [9]
    Chapter 15: The end of it all - CS, FSU
    Position independent code needs no relocation for items in the code unit, although external references will still need some sort of scheme (import and export ...
  10. [10]
    Position-Independent Code - Linker and Libraries Guide
    Position-independent code is not tied to a specific address. This independence allows the code to execute efficiently at a different address in each process ...
  11. [11]
    Compiler Options Hardening Guide for C and C++
    Effectively configuring the compiler options also has several benefits during development such as enhanced compiler warnings, static analysis, and debug ...
  12. [12]
    Position Independent Executable (PIE) Performance - Red Hat
    Dec 12, 2012 · Position Independent Executables (PIE) use randomization as an exploit mitigation technique against attacks on return oriented programming.
  13. [13]
  14. [14]
    404 Not Found
    Insufficient relevant content.
  15. [15]
    Arm Architecture Reference Manual for A-profile architecture
    **Summary of PC-relative Addressing Modes for Position-Independent Code in ARMv8-A:**
  16. [16]
    Position Independent Code (PIC) in shared libraries
    Nov 3, 2011 · This article explained what position independent code is, and how it helps create shared libraries with shareable read-only text sections.
  17. [17]
    All about Global Offset Table | MaskRay
    Aug 28, 2021 · For position independent code ( -fpie and -fpic ), the compiler uses GOT indirection conservatively. 1 2, extern int ext_var; int foo ...
  18. [18]
    All about Procedure Linkage Table | MaskRay
    Sep 19, 2021 · Many architectures encode a branch/jump/call instruction with PC-relative addressing, ie the distance to the target is encoded in the instruction.
  19. [19]
    Load-time relocation of shared libraries - Eli Bendersky's website
    Aug 25, 2011 · This article's aim is to explain how a modern operating system makes it possible to use shared libraries with load-time relocation.
  20. [20]
    Understanding the x64 code models - Eli Bendersky's website
    Jan 3, 2012 · The small model happily assumes everything fits into the lower 2GB of memory, and the large model assumes everything is possible and any symbol ...
  21. [21]
    History - Multics
    Jul 31, 2025 · MIT started providing time-sharing service on Multics to users in fall of 1969. GE sold the next system to the US Air Force, and the military ...Missing: motivations | Show results with:motivations
  22. [22]
    [PDF] Virtual Memory, Processes, and Sharing in MULTICS - andrew.cmu.ed
    Each segment is a logically distinct unit of information having attributes of length and access privilege and may grow or shrink independently of other segments ...
  23. [23]
    [PDF] Chapter 8 Loading and overlays
    Jun 15, 1999 · TSS/360 position independent code. TSS took a brute-force approach. Every routine had two addresses, the address of the code, known as the V ...
  24. [24]
    [PDF] System/360 Model 67 Time Sharing System Preliminary Technical ...
    Normally, this single module is input directly to the dynamic linkage loader, and all other modules necessary to form a total program are dynamically linked ...
  25. [25]
    [PDF] Tool Interface Standard (TIS) Executable and Linking Format (ELF ...
    The Executable and Linking Format was originally developed and published by UNIX System ... This relocation type resembles R_386_PC32, except it uses the address.
  26. [26]
    Evolution of the ELF object file format - MaskRay
    May 26, 2024 · Unix System Laboratories (USL) created ELF for their System V Release 4 in late 1980s. USL also maintained the System V Application Binary ...
  27. [27]
    ld.so(8) - Linux manual page - man7.org
    The programs ld.so and ld-linux.so* find and load the shared objects (shared libraries) needed by a program, prepare the program to run, and then run it.
  28. [28]
    Relocation Types - Oracle® Solaris 11.2 Linkers and Libraries Guide
    The relocations that are listed in the following table are defined for x64. Table 12-19 x64: ELF Relocation Types. Name.
  29. [29]
    ld-elf.so - FreeBSD Manual Pages
    The ld-elf.so.1 utility is a self-contained shared object providing run-time support for loading and link-editing shared objects into a process' address space.Missing: pic | Show results with:pic
  30. [30]
    ToolChain/CompilerFlags - Ubuntu Wiki
    Mar 22, 2024 · Ubuntu's GCC uses the --enable-default-pie configuration, which means that the flags -fPIE -pie are enabled by default. -fstack-clash-protection.
  31. [31]
    PE Format - Win32 apps - Microsoft Learn
    Jul 14, 2025 · This document specifies the structure of executable (image) files and object files under the Microsoft Windows family of operating systems.
  32. [32]
    Relocation of PE DLLs - Load-time or like ELF? - Stack Overflow
    Oct 30, 2015 · So, for WIN32 the relocation is done at load-time, and then at runtime the memory references are direct? How often do DLLs require relocation ( ...Is there an ELF equivalent of PE base relocations?Relocation tables in PE is legacy?More results from stackoverflow.comMissing: overhead | Show results with:overhead
  33. [33]
    A dive into the PE file format - Part 6: PE Base Relocations
    Oct 28, 2021 · In this post we're going to talk about PE base relocations. We're going to discuss what relocations are, then we'll take a look at the relocation table.
  34. [34]
    /DYNAMICBASE | Microsoft Learn
    May 6, 2022 · The /DYNAMICBASE option modifies the header of an executable image, a .dll or .exe file, to indicate whether the application should be ...
  35. [35]
    Under the Hood: Happy 10th Anniversary, Windows | Microsoft Learn
    The release of Windows 3.0 in May 1990 marked the beginning of widespread Windows ... DLL's data area is another gulf between programs written in 1990 and today.
  36. [36]
    Under the Hood: Programming for 64-bit Windows | Microsoft Learn
    Oct 24, 2019 · By not having hardcoded addresses, the code is position-independent, which means that the code doesn't need to be modified to be correct for its ...Missing: history | Show results with:history
  37. [37]
    Six Facts about Address Space Layout Randomization on Windows
    Mar 17, 2020 · Since Windows DLLs do not use position-independent code, the only way their code can be shared between processes is to always be loaded at the ...Missing: MSVC | Show results with:MSVC
  38. [38]
    Position Independent Executables (PIE) - Red Hat
    Nov 28, 2012 · Position Independent Executables (PIE) are an output of the hardened package build process. A PIE binary and all of its dependencies are loaded into random ...
  39. [39]
    The Curious Case of Position Independent Executables - eklitzke.org
    May 10, 2016 · You can use the -pie or -PIE flags to GCC to create what is called a position independent executable (aka PIE). When you do this GCC will only generate ...Missing: challenges | Show results with:challenges
  40. [40]
    Link Options (Using the GNU Compiler Collection (GCC))
    A static position independent executable is similar to a static executable, but can be loaded at any address without a dynamic linker.
  41. [41]
    Security Features - Fedora Project Wiki
    As of Fedora 23, packages in Fedora are compiled as PIE by default across all architectures, with a few exceptions that are still being worked on.
  42. [42]
    SteveBeattie/PIENotes - Ubuntu Wiki
    Dec 3, 2015 · Notes about enabling PIE by default in gcc for amd64. The following is my notes about landing PIE in 16.04.<|separator|>
  43. [43]
    [PDF] Q: Exploit Hardening Made Easy - USENIX
    Programs can be manually compiled into position independent executables. (PIEs) which can then be loaded to multiple positions in memory. Modern ...
  44. [44]
    [PDF] Effective Entropy: Security-Centric Metric for Memory Randomization ...
    Using Effective Entropy, we present a comparison of static Address Space Layout Ran- domization (ASLR), Position Independent Executable. (PIE) ASLR, and a ...Missing: implications | Show results with:implications
  45. [45]
    [PDF] Oxymoron: Making Fine-Grained Memory Randomization Practical ...
    Aug 20, 2014 · The GOT is used in position-independent code such as libraries anyway. We just need to substitute the way the address of the GOT is calculated ...Missing: implications | Show results with:implications
  46. [46]
    [PDF] Size Does Matter In Turing-complete Return-oriented Programming
    hasn't been compiled as position-independent code. By default, Linux programs aren't compiled with this op- tions, as it comes with a performance hit [12] ...
  47. [47]
    Technical Q&A QA1788: Building a Position Independent Executable
    Feb 20, 2014 · Position Independent Executable (PIE) applications can be loaded at a random memory address when run. This has security benefits for your application.Missing: 2010 | Show results with:2010