Skip to content
  • Moritz Angermann's avatar
    6471cc6a
    [linker] Fix out of range relocations. · 6471cc6a
    Moritz Angermann authored and Ben Gamari's avatar Ben Gamari committed
    mmap may return address all over the place. mmap_next will ensure we get
    the next free page after the requested address.
    
    This is especially important for linking on aarch64, where the memory model with PIC
    admits relocations in the +-4GB range, and as such we can't work with
    arbitrary object locations in memory.
    
    Of note: we map the rts into process space, so any mapped objects must
    not be ouside of the 4GB from the processes address space.
    
    (cherry picked from commit aedfeb0b)
    6471cc6a
    [linker] Fix out of range relocations.
    Moritz Angermann authored and Ben Gamari's avatar Ben Gamari committed
    mmap may return address all over the place. mmap_next will ensure we get
    the next free page after the requested address.
    
    This is especially important for linking on aarch64, where the memory model with PIC
    admits relocations in the +-4GB range, and as such we can't work with
    arbitrary object locations in memory.
    
    Of note: we map the rts into process space, so any mapped objects must
    not be ouside of the 4GB from the processes address space.
    
    (cherry picked from commit aedfeb0b)
Loading