Skip to content
  1. Jul 04, 2017
  2. Jul 03, 2017
  3. Jul 01, 2017
  4. 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
  5. Jun 29, 2017
  6. 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
    • George Rimar's avatar
      [ELF] - Do not set st_size field of SHT_UNDEF symbols. · dbe843d6
      George Rimar authored
      This fixes PR33598.
      
      Size field for undefined symbols is not significant.
      Setting it to fixed value, like zero, may be useful though.
      
      For example when we have 2 DSO's, like in this PR, if lower level DSO may
      change slightly (in part of some symbol's st_size)  and higher-level DSO is
      rebuilt, then tools that monitoring checksum of high level DSO file can notice
      it and trigger cascade of some other unnecessary actions. 
      If we set st_size to zero, that can be avoided.
      
      Differential revision: https://reviews.llvm.org/D34673
      
      llvm-svn: 306526
      dbe843d6
    • Peter Smith's avatar
      [ELF] Consolidate .ARM.extab.* sections into .ARM.extab · 691ff766
      Peter Smith authored
      When -ffunction-sections and ARM C++ exceptions are used each .text.suffix
      section will have at least one .ARM.exidx.suffix section and may have an
      additional .ARM.extab.suffix section if the unwinding instructions are too
      large to inline into the .ARM.exidx table entry. For a large program without
      a linker script this can lead to a large number of section header table
      entries that can increase the size of the ELF file.
      
      This change introduces a default rule for .ARM.extab.* to be placed in
      a single output section called .ARM.extab . This follows the behavior of
      ld.gold and ld.bfd.
      
      fixes pr33407
      
      Differential Revision: https://reviews.llvm.org/D34678
      
      llvm-svn: 306522
      691ff766
    • Rafael Espindola's avatar
      Check the produced file instead of stderr. · 36f2edb6
      Rafael Espindola authored
      It is somewhat pointless to check that a specific error is not
      produced. That is already checked by the ld.lld exit value.
      
      Instead make the test a bit stronger by checking that the output file
      has the expected symbol and section.
      
      llvm-svn: 306496
      36f2edb6
  7. Jun 27, 2017
  8. Jun 26, 2017
Loading