Skip to content
  1. May 31, 2017
    • Rafael Espindola's avatar
      Store a single Parent pointer for InputSectionBase. · db5e56f7
      Rafael Espindola authored
      Before InputSectionBase had an OutputSection pointer, but that was not
      always valid. For example, if it was a merge section one actually had
      to look at MergeSec->OutSec.
      
      This was brittle and caused bugs like the one fixed by r304260.
      
      We now have a single Parent pointer that points to an OutputSection
      for InputSection, but to a SyntheticSection for merge sections and
      .eh_frame. This makes it impossible to accidentally access an invalid
      OutSec.
      
      llvm-svn: 304338
      db5e56f7
    • Rafael Espindola's avatar
      Simplify. NFC. · d54c5665
      Rafael Espindola authored
      llvm-svn: 304334
      d54c5665
    • Rafael Espindola's avatar
      Simplify. NFC. · 0dc25107
      Rafael Espindola authored
      llvm-svn: 304330
      0dc25107
    • Rafael Espindola's avatar
      Simplify. NFC. · 23db6360
      Rafael Espindola authored
      llvm-svn: 304328
      23db6360
    • Rafael Espindola's avatar
      Fix a crash. · b47c6e5c
      Rafael Espindola authored
      We would crash if a SHF_LINK_ORDER section pointed to a non
      InputSection section. Since those sections are not merged in order,
      SHF_LINK_ORDER is pretty meaningless and we can error on that case.
      
      llvm-svn: 304327
      b47c6e5c
    • Peter Smith's avatar
      [ELF] .ARM.exidx sentinel section should use InputSectionDescriptions. · ea79b215
      Peter Smith authored
          
      This change converts the writing of the .ARM.exidx sentinel section to use
      the InputSectionDescriptions instead of OutputSection::Sections this is in
      preparation for the retirement of OutputSection::Sections.
          
      Differential Revision: https://reviews.llvm.org/D33500
      
      llvm-svn: 304289
      ea79b215
    • Rafael Espindola's avatar
      Fix crash when processing relocations in .eh_frame. · 180de970
      Rafael Espindola authored
      This happens when attempting to link shared libraries using exceptions on
      MIPS. It requires -z notext because clang generates R_MIPS_64 relocations
      inside .eh_frame.
      The crash happened because for EhInputSection the OutSec member is null.
      
      Patch by Alexander Richardson!
      
      llvm-svn: 304260
      180de970
  2. May 30, 2017
  3. May 29, 2017
    • George Rimar's avatar
      [ELF] - Do not allow -r to eat comdats. · 3b189d16
      George Rimar authored
      This is PR33052, "Bug 33052 - -r eats comdats ".
      
      To fix it I stop removing group section from out when -r is given
      and fixing SHT_GROUP content when writing it just like we do some
      other fixup, e.g. for Rel[a]. (it needs fix for section indices that
      are in group).
      
      Differential revision: https://reviews.llvm.org/D33485
      
      llvm-svn: 304140
      3b189d16
  4. May 26, 2017
  5. May 25, 2017
    • Rafael Espindola's avatar
      Revert "Simplify a variable type by using StringRef instead of CachedHashStringRef." · 1c2baad6
      Rafael Espindola authored
      This reverts commit r303787.
      
      It caused a slowdown in fast links. That is, links with no debug info
      or optimizations.
      
      llvm-svn: 303925
      1c2baad6
    • Zachary Turner's avatar
      [lld] Fix a bug where we continually re-follow type servers. · 2897e030
      Zachary Turner authored
      Originally this was intended to be set up so that when linking
      a PDB which refers to a type server, it would only visit the
      PDB once, and on subsequent visitations it would just skip it
      since all the records had already been added.
      
      Due to some C++ scoping issues, this was not occurring and it
      was revisiting the type server every time, which caused every
      record to end up being thrown away on all subsequent visitations.
      
      This doesn't affect the performance of linking clang-cl generated
      object files because we don't use type servers, but when linking
      object files and libraries generated with /Zi via MSVC, this means
      only 1 object file has to be linked instead of N object files, so
      the speedup is quite large.
      
      llvm-svn: 303920
      2897e030
    • Rui Ueyama's avatar
      Accept not only --reproduce <foo> but also --reproduce=<foo>. · 5012858e
      Rui Ueyama authored
      llvm-svn: 303905
      5012858e
    • Rui Ueyama's avatar
      Use MD5::hash(). NFC. · 236e7810
      Rui Ueyama authored
      llvm-svn: 303893
      236e7810
    • Rui Ueyama's avatar
      Do not allow delay-importing data symbols. · 69ae29b1
      Rui Ueyama authored
      If you pass /delayload:<dllname> to the COFF linker, it creates thunks
      so that DLLs are loaded when they are used for the first time instead of
      load-time.
      
      This mechanism do not work for data symbols as there's no way to trap
      acccesses to data imported from DLLs. (Technically, I think if we do not
      initially map dllimport tables in memory, we could actually trap accesses
      and delay-load data symbols, but that's not what Windows do.)
      
      This patch is to report an error when you try to delay-load data symbols.
      
      Fixes https://bugs.llvm.org/show_bug.cgi?id=33106
      
      Differential Revision: https://reviews.llvm.org/D33557
      
      llvm-svn: 303890
      69ae29b1
    • Rui Ueyama's avatar
      Reduce indentation. NFC. · 0e8521c0
      Rui Ueyama authored
      llvm-svn: 303815
      0e8521c0
    • Rui Ueyama's avatar
      Garbage collect dllimported symbols. · 9aa82f76
      Rui Ueyama authored
      This is a different implementation than r303225 (which was reverted
      in r303270, re-submitted in r303304 and then re-reverted in r303527).
      
      In the previous patch, I tried to add Live bit to each dllimported
      symbol. It turned out that it didn't work with "oldnames.lib" which
      contains a lot of weak aliases to dllimported symbols.
      
      The way we handle weak aliases is to check if undefined symbols
      can be resolved using weak aliases, and if so, memcpy the Defined
      symbols to weak Undefined symbols, so that any references to weak
      aliases automatically see defined symbols instead of undefined ones.
      
      This memcpy happens before MarkLive kicks in.
      
      That means we may have multiple copies of dllimported symbols. So
      turning on one instance's Live bit is not enough.
      
      This patch moves the Live bit to dllimport file. Since multiple
      copies of dllsymbols still point to the same file, we can use it as the
      central repository to keep track of liveness.
      
      Differential Revision: https://reviews.llvm.org/D33520
      
      llvm-svn: 303814
      9aa82f76
    • Rafael Espindola's avatar
      Simplify MipsRldMapSection::writeTo. · a28414d7
      Rafael Espindola authored
      It is not clear why a synthetic section wants to use padding defined
      in the linker script. The padding is for the space between sections.
      
      It was also missing a test.
      
      llvm-svn: 303812
      a28414d7
  6. May 24, 2017
Loading