Subject: vdso function descriptors (VDS64_HAS_DESCRIPTORS)?

From: Joe Lawrence <[email-masked]>
Date: Mon, 17 Feb 2020 11:08:52 -0500

I was wondering if there was history behind VDS64_HAS_DESCRIPTORS and in
what cases would one want to turn them on?  (Note, I'm assuming they are
an implementation of Function Descriptors. [1])

arch/powerpc/include/asm/vdso.h unsets the macro:

  /* Define if 64 bits VDSO has procedure descriptors */
  #undef VDS64_HAS_DESCRIPTORS

so I don't believe they are ever used by default -- in this case
V_FUNCTION_BEGIN doesn't add to the .opd section with .name, .TOC base,
etc.

Manually setting VDS64_HAS_DESCRIPTORS results in a vdso64.so in which
binutils tools like readelf properly report functions with symbol type
FUNC instead of NOTYPE.

Are there pieces of the build/etc toolchain unprepared for function
descriptors?  I'm just trying to figure out why the code defaults to
unsetting them.

Thanks,

-- Joe

[1] http://refspecs.linuxfoundation.org/ELF/ppc64/PPC-elf64abi.html#FUNC-DES