Skip to content
  1. Feb 28, 2017
    • Rui Ueyama's avatar
      De-template DefinedRegular. · 80474a26
      Rui Ueyama authored
      Differential Revision: https://reviews.llvm.org/D30348
      
      llvm-svn: 296508
      80474a26
    • Rui Ueyama's avatar
      1b003183
    • Rui Ueyama's avatar
      Fix wrong TLS symbol values. · 4d574b32
      Rui Ueyama authored
      I do not fully understand why we had these values in the tests, but
      the new value matches what ld.bfd and ld.gold set, so I guess that
      was just a mistake.
      
      Differential Revision: https://reviews.llvm.org/D30441
      
      llvm-svn: 296505
      4d574b32
    • Rafael Espindola's avatar
      Revert "Add terminator to .eh_frame sections" · b691ccf0
      Rafael Espindola authored
      This reverts commit r296378.
      
      I am pretty sure this is incorrect. In particular, for just
      
              .cfi_startproc
              nop
              .cfi_endproc
      
      We now add an extra 4 zeros that neither bfd nor gold add.
      
      llvm-svn: 296503
      b691ccf0
    • George Rimar's avatar
      [ELF] - Do not set flags for CopyRelSection. NFC. · 9f57a4f1
      George Rimar authored
      It does not make sense. Them added either to
      Out::BssRelRo or Out::Bss, which are always RW.
      
      llvm-svn: 296475
      9f57a4f1
    • George Rimar's avatar
      [ELF] - Remove ElfSym::EhdrStart member. NFC. · 6159f129
      George Rimar authored
      We do not use it later, so don't have to store.
      
      llvm-svn: 296466
      6159f129
    • Sean Silva's avatar
      Comment on the typical/simple case of VA calculation · 6ab3926e
      Sean Silva authored
      There are many special cases and a layer of abstraction or two in the
      way, but the VA calculation in the typical case is actually very simple
      and probably makes perfect sense even to somebody new to linkers.
      
      Also, this line brings together many components and is a good place to
      start understanding the linker (or improve one's existing
      understanding).
      
      llvm-svn: 296451
      6ab3926e
    • Sean Silva's avatar
      Add a comment. · a9ba450c
      Sean Silva authored
      Naively it seemed at first like getVA had the responsibility of adding
      the addend, and getSymVA had the responsibility of getting the symbol
      VA.
      So it was not obvious to me at first why getVA passes Addend to
      getSymVA. In fact, it passes it as a mutable reference.
      
      It turns out that it only matters for SHF_MERGE sections, and in
      particular only for STT_SECTION symbols that are used as a hack for
      reducing the number of local symbols (e.g. to avoid a local symbol for
      each string in the string table).
      
      llvm-svn: 296448
      a9ba450c
    • Rui Ueyama's avatar
      Refactor {Gnu,}HashTableSection classes. · 6b776ad9
      Rui Ueyama authored
      In other places in LLD, we use write32<E> instead of Elf_Word.
      This patch uses the same technique in the hash table classes.
      The hash table classes needs improving as they have almost no
      comments. We at least need to describe the hash table structure
      and why we have to support two different on-disk hash tables
      for the same purpose. I'll do that later.
      
      llvm-svn: 296439
      6b776ad9
    • Rui Ueyama's avatar
      Remove unused typedefs. · ab0a85ef
      Rui Ueyama authored
      llvm-svn: 296437
      ab0a85ef
    • Rui Ueyama's avatar
      Remove useless assignments. · c3726f82
      Rui Ueyama authored
      These assignments seem meaningful, but actually all tests pass without them.
      
      llvm-svn: 296436
      c3726f82
    • Rui Ueyama's avatar
      Merge SymbolTableSection::add{Global,Local} into one function. · b8dcdb59
      Rui Ueyama authored
      Previously, these two functions put their symbols in different queues.
      Now that the queues have been merged. So there's no point to keep two
      separate functions.
      
      llvm-svn: 296435
      b8dcdb59
    • Rui Ueyama's avatar
      Return early. NFC. · 406331eb
      Rui Ueyama authored
      llvm-svn: 296434
      406331eb
    • Rui Ueyama's avatar
      Move SymbolTableSection::getOutputSection to SymbolBody::getOutputSection. · 968db48c
      Rui Ueyama authored
      That function doesn't use any member of SymbolTableSection, so I
      couldn't see a reason to make it a member of that class. The function
      takes a SymbolBody, so it is more natural to make it a member of
      SymbolBody.
      
      llvm-svn: 296433
      968db48c
    • Rui Ueyama's avatar
      Simplify SymbolTableSection<ELFT>::finalizeContents(). · 6e96734d
      Rui Ueyama authored
      Previously, there were three conditions: .symtab, .dynsym or we are
      producing a relocatable output. Turned out that the third condition is
      the same as the first one. This patch removes that third condition and
      simplify code.
      
      llvm-svn: 296431
      6e96734d
    • Sean Silva's avatar
      Add Triple::thumb to getBitcodeMachineKind · 1d96185f
      Sean Silva authored
      We really need to find a way to get this info from a single point of
      truth in the LLVM backend, but it seems that the EM_* constants are
      buried deep inside the constructors of the MCAsmBackend's.
      
      For now, just fill in entries as we run into cases. AFAIK these mappings
      are largely immutable, so we get a 75% discount on the technical debt
      (code is duplicated, but little chance of divergence).
      
      llvm-svn: 296429
      1d96185f
    • Rui Ueyama's avatar
      Improve SymbolTableSection synthetic section. · 1f032537
      Rui Ueyama authored
      The previous code was a bit hard to understand because it unnecessarily
      distinguished local and non-local symbols. It had NumLocals member
      variable, but that variable didn't have a number of local symbols but
      had some value that I cannot describe easily.
      
      This patch rewrites SynbolTableSection::finalizeContents and
      SymbolTableSection::writeTo to make it easy to understand. NumLocals
      member variable has been removed, and writeGlobalSymbols and
      writeLocalSymbols have been merged into one function.
      
      There's still a piece of code that I think unnecessary. I'm not removing
      that code in this patch, but will do in a follow-up patch.
      
      llvm-svn: 296423
      1f032537
  2. Feb 27, 2017
  3. Feb 25, 2017
Loading