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
  6. May 24, 2017
    • Rui Ueyama's avatar
      Improve parallelism of ICF. · f04c0483
      Rui Ueyama authored
      This is the only place we use threads for ICF. The intention of this code
      was to split an input vector into 256 shards and process them in parallel.
      What the code was actually doing was to split an input into 257 shards,
      process the first 256 shards in parallel, and the remaining one in serial.
      
      That means this code takes ceil(256/n)+1 instead of ceil(256/n) where n
      is the number of available CPU cores. The former converges to 2 while
      the latter converges to 1.
      
      This patches fixes the above issue.
      
      llvm-svn: 303797
      f04c0483
    • Kamil Rytarowski's avatar
      Replace std::call_once with llvm:call_once · e739e49c
      Kamil Rytarowski authored
      Summary:
      This is required on some platforms, as GNU libstdc++ std::call_once is known to be buggy.
      
      This fixes operation of LLD on at least NetBSD and perhaps OpenBSD and Linux PowerPC.
      
      The same change has been introduced to LLVM and LLDB.
      
      Reviewers: ruiu
      
      Reviewed By: ruiu
      
      Subscribers: emaste, #lld
      
      Tags: #lld
      
      Differential Revision: https://reviews.llvm.org/D33508
      
      llvm-svn: 303788
      e739e49c
    • Rui Ueyama's avatar
      Simplify a variable type by using StringRef instead of CachedHashStringRef. · 466c82b7
      Rui Ueyama authored
      A variable `ComdatGroup` is not supposed to contain a large number of
      items. Even when linking clang, it ends up having only 300K strings.
      It doesn't make sense to use CachedHashStringRef for this hash table.
      This patch has neutral or slightly positive impact on performance while
      reducing code complexity.
      
      llvm-svn: 303787
      466c82b7
    • Rafael Espindola's avatar
      Move writeTo to OutputSectionCommand. · 55b169bf
      Rafael Espindola authored
      This reduces how many times we have to map from OutputSection to
      OutputSectionCommand. It is a required step to moving
      clearOutputSections earlier.
      
      In order to always use writeTo in OutputSectionCommand we have to call
      fabricateDefaultCommands for -r links and move section compression
      after it.
      
      llvm-svn: 303784
      55b169bf
    • Rafael Espindola's avatar
      Move clearOutputSections earlier. NFC. · 27dd659b
      Rafael Espindola authored
      llvm-svn: 303781
      27dd659b
    • Dmitry Mikulin's avatar
      Do not track section types of previous sections, always use PROGBITS for dummy sections. · fd0c844f
      Dmitry Mikulin authored
      Fix for PR33029.
      
      llvm-svn: 303770
      fd0c844f
    • Rafael Espindola's avatar
      Clear OutSec->Sections. · aeb4b7d2
      Rafael Espindola authored
      Once the dummy linker script is created, we want it to be used for
      everything to avoid having two redundant representations that can get
      out of sync.
      
      We were already clearing OutputSections. With this patch we clear the
      Sections vector of every OutputSection.
      
      llvm-svn: 303703
      aeb4b7d2
Loading