• Ard Biesheuvel's avatar
    arm64: vmlinux.lds: make __rela_offset and __dynsym_offset ABSOLUTE · d6732fc4
    Ard Biesheuvel authored
    Due to the untyped KIMAGE_VADDR constant, the linker may not notice
    that the __rela_offset and __dynsym_offset expressions are absolute
    values (i.e., are not subject to relocation). This does not matter for
    KASLR, but it does confuse kallsyms in relative mode, since it uses
    the lowest non-absolute symbol address as the anchor point, and expects
    all other symbol addresses to be within 4 GB of it.
    
    Fix this by qualifying these expressions as ABSOLUTE() explicitly.
    
    Fixes: 0cd3defe ("arm64: kernel: perform relocation processing from ID map")
    Cc: <stable@vger.kernel.org>
    Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
    Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
    d6732fc4
vmlinux.lds.S 5.21 KB