[all-commits] [llvm/llvm-project] 4e80c7: [ELF] Support -r --gc-sections

Fangrui Song via All-commits all-commits at lists.llvm.org
Thu Jul 23 08:19:19 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 4e80c768c28fa919aa3d4fd662af8ea99feda4d6
      https://github.com/llvm/llvm-project/commit/4e80c768c28fa919aa3d4fd662af8ea99feda4d6
  Author: Fangrui Song <i at maskray.me>
  Date:   2020-07-23 (Thu, 23 Jul 2020)

  Changed paths:
    M lld/ELF/Driver.cpp
    M lld/ELF/InputFiles.cpp
    M lld/test/ELF/driver.test
    A lld/test/ELF/relocatable-gc.s

  Log Message:
  -----------
  [ELF] Support -r --gc-sections

-r --gc-sections is usually not useful because it just makes intermediate output
smaller. https://bugs.llvm.org/show_bug.cgi?id=46700#c7 mentions a use case:
validating the absence of undefined symbols ealier than in the final link.

After D84129 (SHT_GROUP support in -r links), we can support -r
--gc-sections without extra code. So let's allow it.

Reviewed By: grimar, jhenderson

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




More information about the All-commits mailing list