Skip to content
  • Samuel Holland's avatar
    Fix compatibility with Linux 4.17+ · d186323a
    Samuel Holland authored
    
    
    The gcompat loader compiled as a static binary doesn't work on Linux
    since commit a4ff8e8620d3f4, failing with the error:
    
    ```
    Uhuuh, elf segment at 0000000000400000 requested but the memory is mapped already
    ```
    
    This is because the binary we are the ELF interpreter for is also loaded
    at 0x400000. While it's actually okay to overlap the binary, since we're
    going to call `execve` again, the kernel doesn't allow the overlap
    anymore. Fix that by compiling the loader as static PIE, so it can be
    loaded at a different address.
    
    Signed-off-by: default avatarSamuel Holland <samuel@sholland.org>
    d186323a
To find the state of this project's repository at the time of any of these versions, check out the tags.