Skip to content
  1. Jul 05, 2017
    • Peter Smith's avatar
      [ELF] Fix Windows build error · 283b9f2d
      Peter Smith authored
      Attempt to fix Windows buildbots From 307131 Replaced return {ET, false};
      with return std::make_pair(ET, false);
      
      llvm-svn: 307137
      283b9f2d
    • Peter Smith's avatar
      [ELF] Allow multiple thunks to be added for a symbol. · fa237642
      Peter Smith authored
      This change permits there to be more than one thunk to be associated with
      a symbol. For interworking thunks we only require one thunk, but range
      extension thunks may require more than one.
      
      Differential Revision: https://reviews.llvm.org/D34037
      
      llvm-svn: 307136
      fa237642
    • Peter Smith's avatar
      [ELF] Introduce Thunk reuse compatibility · 7d66e849
      Peter Smith authored
      On ARM the interworking thunks are only produced for branch instructions
      that can't be changed into a blx instruction so only Thumb callers would
      call Thumb thunks and only ARM callers would call ARM thunks. With range
      extension thunks branch and link instructions may need a Thunk. These
      instructions can be rewritten as a blx and can use either ARM or Thumb
      thunks.
      
      We introduce an isCompatibleWith() function so that a caller can check if
      an existing Thunk is compatible before reusing it.
      
      Differential Revision: https://reviews.llvm.org/D34035
      
      llvm-svn: 307132
      7d66e849
    • Peter Smith's avatar
      [ELF] Extract allocateHeaders() from assignAddresses() · 5aedebff
      Peter Smith authored
      The allocateHeaders() function is called at the end of assignAddresses(), it
      decides whether the ELF header and program header table can be allocated to
      a PT_LOAD program header. As the function alters state, it prevents
      assignAddresses() from being called multiple times.
      
      This change splits out the call to allocateHeaders() from assignAddresses()
      this will permit assignAddresses() to be called while processing range
      extension thunks without trying to allocateHeaders().
      
      Differential Revision: https://reviews.llvm.org/D34344
      
      llvm-svn: 307131
      5aedebff
    • Rafael Espindola's avatar
      Fix PR33635. · cf00d437
      Rafael Espindola authored
      This is a semantic revert of r306036.
      
      We have to change the names, otherwise dynamic relocations will point
      to the wrong name.
      
      llvm-svn: 307110
      cf00d437
  2. Jul 04, 2017
  3. Jul 03, 2017
  4. Jul 01, 2017
  5. Jun 30, 2017
    • Zachary Turner's avatar
      [llvm-pdbutil] Output the symbol offset when dumping. · af8c75a8
      Zachary Turner authored
      Type records have a unique type index, but symbol records do
      not.  Instead, symbol records refer to other symbol records
      by referencing their offset in the symbol stream.  In a sense
      this is the analogue of the TypeIndex, but we are not printing
      it in the dumper.  Printing it not only gives us more useful
      information when manually investigating the contents of a PDB,
      but also allows us to write better tests by enabling us to
      verify that fields that reference other symbol records do
      so correctly.
      
      Differential Revision: https://reviews.llvm.org/D34906
      
      llvm-svn: 306890
      af8c75a8
    • Richard Smith's avatar
      Fix ODR violations due to abuse of LLVM_YAML_IS_(FLOW_)?SEQUENCE_VECTOR · 4451cb63
      Richard Smith authored
      This is a short-term fix for PR33650 aimed to get the modules build bots green again.
      
      Remove all the places where we use the LLVM_YAML_IS_(FLOW_)?SEQUENCE_VECTOR
      macros to try to locally specialize a global template for a global type. That's
      not how C++ works.
      
      Instead, we now centrally define how to format vectors of fundamental types and
      of string (std::string and StringRef). We use flow formatting for the former
      cases, since that's the obvious right thing to do; in the latter case, it's
      less clear what the right choice is, but flow formatting is really bad for some
      cases (due to very long strings), so we pick block formatting. (Many of the
      cases that were using flow formatting for strings are improved by this change.)
      
      Other than the flow -> block formatting change for some vectors of strings,
      this should result in no functionality change.
      
      Differential Revision: https://reviews.llvm.org/D34907
      
      Corresponding LLVM change is r306878.
      
      llvm-svn: 306880
      4451cb63
    • Eric Beckmann's avatar
      Tighten up tests for .rsrc section emission. · 5de73610
      Eric Beckmann authored
      Summary:
      There have been bugs with the WindowsResource library, such as incorrect
      symbols for addresses.  Directly checking the .rsrc in the final PE will
      help ensure this doesn't happen again.
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D34900
      
      llvm-svn: 306854
      5de73610
    • George Rimar's avatar
      [ELF] - Resolve references properly when using .symver directive · aad84e2e
      George Rimar authored
      This is PR28414. 
      Previously LLD was unable to link following:
      (failed with undefined symbol bar)
      
      ```
      Version script:
      SOME_VERSION { global: *; };
      
      .global _start
      .global bar
      .symver _start, bar@@SOME_VERSION
      _start:
        jmp bar
      ```
      
      Manual has next description:
      //
      .symver name, name2@@nodename
      In this case, the symbol name must exist and be defined within the file being assembled. It is similar to name2@nodename. 
      **The difference is name2@@nodename will also be used to resolve references to name2 by the linker**
      https://sourceware.org/binutils/docs/as/Symver.html
      //
      
      Patch implements that. If we have name@@ver symbol and name is undefined, 
      name@@ver is used to resolve references to name.
      
      Differential revision: https://reviews.llvm.org/D33680
      
      llvm-svn: 306813
      aad84e2e
    • Martin Storsjö's avatar
      Update a test case after LLVM r306794 · e24f434e
      Martin Storsjö authored
      llvm-svn: 306796
      e24f434e
    • Sam Clegg's avatar
      Remove unused declarations · c0909622
      Sam Clegg authored
      Differential Revision: https://reviews.llvm.org/D34852
      
      llvm-svn: 306772
      c0909622
  6. Jun 29, 2017
  7. Jun 28, 2017
    • Rui Ueyama's avatar
      Move copy function from Symbol to SymbolBody. · b2269ec4
      Rui Ueyama authored
      We could have add this function either Symbol or SymbolBody. I added it
      to Symbol at first. But I noticed that if I've added it to SymbolBody,
      we could've removed SymbolBody::setName(). So I'll do that in this patch.
      
      llvm-svn: 306590
      b2269ec4
    • Rui Ueyama's avatar
      Define Symbol::copyBody function. · 8e11b6d9
      Rui Ueyama authored
      This patch adds a utility function to Symbol. This function should
      be useful in https://reviews.llvm.org/D33680 too.
      
      llvm-svn: 306587
      8e11b6d9
    • Reid Kleckner's avatar
      [COFF] Allow debug info to relocate against discarded symbols · a1001b8f
      Reid Kleckner authored
      Summary:
      In order to do this without switching on the symbol kind multiple times,
      I created Defined::getChunkAndOffset and use that instead of
      SymbolBody::getRVA in the inner relocation loop.
      
      Now we get the symbol's chunk before switching over relocation types, so
      we can test if it has been discarded outside the inner relocation type
      switch. This also simplifies application of section relative
      relocations. Previously we would switch on symbol kind to compute the
      RVA, then the relocation type, and then the symbol kind again to get the
      output section so we could subtract that from the symbol RVA. Now we
      *always* have an OutputSection, so applying SECREL and SECTION
      relocations isn't as much of a special case.
      
      I'm still not quite happy with the cleanliness of this code. I'm not
      sure what offsets and bases we should be using during the relocation
      processing loop: VA, RVA, or OutputSectionOffset.
      
      Reviewers: ruiu, pcc
      
      Reviewed By: ruiu
      
      Subscribers: majnemer, inglorion, llvm-commits, aprantl
      
      Differential Revision: https://reviews.llvm.org/D34650
      
      llvm-svn: 306566
      a1001b8f
    • Rui Ueyama's avatar
      Add basic 64-bit SPARC support · 0cc14835
      Rui Ueyama authored
      Add support for the most common SPARC relocations.
      Make DT_PLTGOT point to the PLT on SPARC.
      Mark the PLT as executable on SPARC.
      
      This adds a basic test that creates a SPARV9 executable
      that invokes the exit system call on OpenBSD.
      
      Patch by Mark Kettenis.
      
      Differential Revision: https://reviews.llvm.org/D34618
      
      llvm-svn: 306565
      0cc14835
    • George Rimar's avatar
      [ELF] - Do not crash when LLD synthesizes output sections with BYTE commands and -r · e0b43df3
      George Rimar authored
      This is PR33596. Previously LLD would crash
      because BYTE command synthesized output section,
      but it was not assigned to Sec member of OutputSectionCommand.
      
      Behaviour of -script and -r combination is not well defined,
      but it seems after this change LLD naturally inherits behavior of
      GNU linkers - creates output section requested in script and does not
      crash anymore.
      
      Differential revision: https://reviews.llvm.org/D34676
      
      llvm-svn: 306527
      e0b43df3
Loading