llvm-project/lld/MachO
Jez Ng db157d2733 [lld-macho] Follow-up to D77893
Summary:
1. Don't have isHidden() depend on isNeeded(). Whether a section is
  hidden is orthogonal from whether it is needed: hidden sections will
  never have a header regardless of whether they have a body. (I know we
  override this method with return false for synthetic sections, but
  regardless I think it's confusing to write it this way for non-synthetic
  sections.)

2. Don't call writeTo() on unneeded sections. D78270 assumes that this
  is true when implementing the stub helper section.

3. Filter out the unneeded sections early on to avoid having to deal
   with them in multiple places.

4. Remove assumption in test that the referenced file has no other symbols.
  (We should create separate input files for future tests to avoid such
  issues.)

Reviewers: ruiu, pcc, MaskRay, smeenai, alexshap, gkm, Ktwu, christylee

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D79460
2020-05-09 20:56:22 -07:00
..
Arch [lld-macho] Support X86_64_RELOC_SIGNED_{1,2,4} 2020-05-04 15:15:35 -07:00
CMakeLists.txt [lld] Merge Mach-O input sections 2020-05-01 16:57:18 -07:00
Config.h [lld-macho][reland] Add support for emitting dylibs with a single symbol 2020-04-28 17:08:32 -07:00
Driver.cpp [lld] Merge Mach-O input sections 2020-05-01 16:57:18 -07:00
Driver.h Reland D75382 "[lld] Initial commit for new Mach-O backend" 2020-04-02 12:03:43 -07:00
ExportTrie.cpp [lld] Merge Mach-O input sections 2020-05-01 16:57:18 -07:00
ExportTrie.h [lld] Merge Mach-O input sections 2020-05-01 16:57:18 -07:00
InputFiles.cpp [lld] Merge Mach-O input sections 2020-05-01 16:57:18 -07:00
InputFiles.h [lld-macho] Add basic support for linking against dylibs 2020-04-21 13:43:19 -07:00
InputSection.cpp [lld] Merge Mach-O input sections 2020-05-01 16:57:18 -07:00
InputSection.h [lld] Merge Mach-O input sections 2020-05-01 16:57:18 -07:00
MergedOutputSection.cpp [lld] Merge Mach-O input sections 2020-05-01 16:57:18 -07:00
MergedOutputSection.h [lld] Merge Mach-O input sections 2020-05-01 16:57:18 -07:00
Options.td [lld-macho][reland] Add support for emitting dylibs with a single symbol 2020-04-28 17:08:32 -07:00
OutputSection.cpp [lld] Merge Mach-O input sections 2020-05-01 16:57:18 -07:00
OutputSection.h [lld-macho] Follow-up to D77893 2020-05-09 20:56:22 -07:00
OutputSegment.cpp [lld-macho] Follow-up to D77893 2020-05-09 20:56:22 -07:00
OutputSegment.h [lld-macho] Follow-up to D77893 2020-05-09 20:56:22 -07:00
SymbolTable.cpp [lld-macho] Add basic support for linking against dylibs 2020-04-21 13:43:19 -07:00
SymbolTable.h [lld][macho] Fix implicit dependency on DenseMap.h include 2020-04-27 14:05:29 +01:00
Symbols.cpp Reland D75382 "[lld] Initial commit for new Mach-O backend" 2020-04-02 12:03:43 -07:00
Symbols.h [lld] Merge Mach-O input sections 2020-05-01 16:57:18 -07:00
SyntheticSections.cpp [lld] Merge Mach-O input sections 2020-05-01 16:57:18 -07:00
SyntheticSections.h [lld] Merge Mach-O input sections 2020-05-01 16:57:18 -07:00
Target.cpp Reland D75382 "[lld] Initial commit for new Mach-O backend" 2020-04-02 12:03:43 -07:00
Target.h [lld-macho] Add basic support for linking against dylibs 2020-04-21 13:43:19 -07:00
Writer.cpp [lld-macho] Follow-up to D77893 2020-05-09 20:56:22 -07:00
Writer.h [lld-macho] Extend SyntheticSections to cover all segment load commands 2020-04-27 12:58:12 -07:00