Skip to content
  • Saleem Abdulrasool's avatar
    riscv: explicitly use symbol offsets for VDSO · fde9c59a
    Saleem Abdulrasool authored
    
    
    The current implementation of the `__rt_sigaction` reference computed an
    absolute offset relative to the mapped base of the VDSO.  While this can
    be handled in the medlow model, the medany model cannot handle this as
    it is meant to be position independent.  The current implementation
    relied on the BFD linker relaxing the PC-relative relocation into an
    absolute relocation as it was a near-zero address allowing it to be
    referenced relative to `zero`.
    
    We now extract the offsets and create a generated header allowing the
    build with LLVM and lld to succeed as we no longer depend on the linker
    rewriting address references near zero.  This change was largely
    modelled after the ARM64 target which does something similar.
    
    Signed-off-by: default avatarSaleem Abdulrasool <abdulras@google.com>
    Tested-by: default avatarNathan Chancellor <nathan@kernel.org>
    Signed-off-by: default avatarPalmer Dabbelt <palmerdabbelt@google.com>
    fde9c59a