Linux powerpc discards *(.gnu.version*) (arch/powerpc/kernel/vmlinux.lds.S)
to suppress --orphan-handling=warn warnings in the -pie output .tmp_vmlinux1
The support is simple. Just add isLive() to:
- Fix an assertion in SectionBase::getPartition() called by VersionTableSection::isNeeded().
- Suppress DT_VERSYM, DT_VERDEF, DT_VERNEED and DT_VERNEEDNUM, if the relevant section is discarded.
Seems you can just use if (part.verSym->isNeeded()) here and if (part.verNeed->isNeeded()) below?