[all-commits] [llvm/llvm-project] 1edd96: [ELF] Support input section description .gnu.versi...

Fangrui Song via All-commits all-commits at lists.llvm.org
Thu Dec 26 09:54:27 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 1edd9651307112447f83a0cd402ee23125f0fdb3
      https://github.com/llvm/llvm-project/commit/1edd9651307112447f83a0cd402ee23125f0fdb3
  Author: Fangrui Song <maskray at google.com>
  Date:   2019-12-26 (Thu, 26 Dec 2019)

  Changed paths:
    M lld/ELF/SyntheticSections.cpp
    A lld/test/ELF/linkerscript/discard-gnu-version.s

  Log Message:
  -----------
  [ELF] Support input section description .gnu.version* in /DISCARD/

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:

1) Fix an assertion in SectionBase::getPartition() called by VersionTableSection::isNeeded().
2) Suppress DT_VERSYM, DT_VERDEF, DT_VERNEED and DT_VERNEEDNUM, if the relevant section is discarded.

Reviewed By: grimar

Differential Revision: https://reviews.llvm.org/D71819




More information about the All-commits mailing list