• Fangrui Song's avatar
    vdso: Improve cmd_vdso_check to check all dynamic relocations · aff69273
    Fangrui Song authored
    The actual intention is that no dynamic relocation exists in the VDSO. For
    this the VDSO build validates that the resulting .so file does not have any
    relocations which are specified via $(ARCH_REL_TYPE_ABS) per architecture,
    which is fragile as e.g. ARM64 lacks an entry for R_AARCH64_RELATIVE. Aside
    of that ARCH_REL_TYPE_ABS is a misnomer as it checks for relative
    relocations too.
    
    However, some GNU ld ports produce unneeded R_*_NONE relocation entries. If
    a port fails to determine the exact .rel[a].dyn size, the trailing zeros
    become R_*_NONE relocations. E.g. ld's powerpc port recently fixed
    https://sourceware.org/bugzilla/show_bug.cgi?id=29540
    
    ). R_*_NONE are
    generally a no-op in the dynamic loaders. So just ignore them.
    
    Remove the ARCH_REL_TYPE_ABS defines and just validate that the resulting
    .so file does not contain any R_* relocation entries except R_*_NONE.
    Signed-off-by: default avatarFangrui Song <maskray@google.com>
    Signed-off-by: Thomas Gleixne...
    aff69273
Makefile 759 Bytes