Skip to content
  1. Jun 26, 2017
    • Peter Smith's avatar
      [ELF] Define _GLOBAL_OFFSET_TABLE_ symbol relative to .got · 113a59e7
      Peter Smith authored
      On many architectures gcc and clang will recognize _GLOBAL_OFFSET_TABLE_ - .
      and produce a relocation that can be processed without needing to know the
      value of _GLOBAL_OFFSET_TABLE_. This is not always the case; for example ARM
      gcc produces R_ARM_BASE_PREL but clang produces the more general
      R_ARM_REL32 to _GLOBAL_OFFSET_TABLE_. To evaluate this relocation
      correctly _GLOBAL_OFFSET_TABLE_ must be defined to be the either the base of
      the GOT or end of the GOT dependent on architecture..
      
      If/when llvm-mc is changed to recognize _GLOBAL_OFFSET_TABLE_ - . this
      change will not be necessary for new objects. However there may still be
      old objects and versions of clang.
      
      Differential Revision: https://reviews.llvm.org/D34355
      
      llvm-svn: 306282
      113a59e7
  2. Jun 24, 2017
  3. Jun 23, 2017
    • Reid Kleckner's avatar
      Silence -Wunused-variable warning · 5a7eca52
      Reid Kleckner authored
      llvm-svn: 306135
      5a7eca52
    • Peter Collingbourne's avatar
      Add parens for python3. · 36d43dd9
      Peter Collingbourne authored
      llvm-svn: 306128
      36d43dd9
    • Peter Collingbourne's avatar
      Add a ThinLTO cache policy for controlling the maximum cache size in bytes. · 8d292233
      Peter Collingbourne authored
      This is useful when an upper limit on the cache size needs to be
      controlled independently of the amount of the amount of free space.
      
      One use case is a machine with a large number of cache directories
      (e.g. a buildbot slave hosting a large number of independent build
      jobs). By imposing an upper size limit on each cache directory,
      users can more easily estimate the server's capacity.
      
      Differential Revision: https://reviews.llvm.org/D34547
      
      llvm-svn: 306126
      8d292233
    • Reid Kleckner's avatar
      [COFF] Fix SECTION and SECREL relocation handling for absolute symbols · 8456411e
      Reid Kleckner authored
      Summary:
      For SECTION relocations against absolute symbols, MSVC emits the largest
      output section index plus one. I've implemented that by threading a
      global variable through DefinedAbsolute that is filled in by the Writer.
      A more library-oriented approach would be to thread the Writer through
      Chunk::writeTo and SectionChunk::applyRel*, but Rui seems to prefer
      doing it this way.
      
      MSVC rejects SECREL relocations against absolute symbols, but only when
      the relocation is in a real output section. When the relocation is in a
      CodeView debug info section destined for the PDB, it seems that this
      relocation error is suppressed, and absolute symbols become zeros in the
      object file. This is easily implemented by checking the input section
      from which we're applying relocations.
      
      This should fix errors about __safe_se_handler_table and
      __guard_fids_table when linking the CRT and generating a PDB.
      
      Reviewers: ruiu
      
      Subscribers: aprantl, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D34541
      
      llvm-svn: 306071
      8456411e
  4. Jun 22, 2017
  5. Jun 21, 2017
  6. Jun 20, 2017
    • Reid Kleckner's avatar
      [codeview] YAMLize all section offsets and indices in symbol records · 91ef9de6
      Reid Kleckner authored
      We forgot to serialize these because llvm-readobj didn't dump them. They
      are typically all zeros in an object file. The linker fills them in with
      relocations before adding them to the PDB. Now we can properly round
      trip these symbols through pdb2yaml -> yaml2pdb.
      
      I made these fields optional with a zero default so that we can elide
      them from our test cases.
      
      llvm-svn: 305857
      91ef9de6
    • Sam Clegg's avatar
      Fix argument numbersing in OPTION macro · 7859216b
      Sam Clegg authored
      The option numbers in the macro were off by one which
      leads to some confusion.  There are actually 12 arguments
      to this macro.
      
      Differential Revision: https://reviews.llvm.org/D34413
      
      llvm-svn: 305823
      7859216b
    • Reid Kleckner's avatar
      [PDB] Don't emit debug info associated with dead chunks · f5bb738f
      Reid Kleckner authored
      Summary:
      Previously we didn't add debug info chunks to the SparseChunks array, so
      they didn't participate in section GC. Now we do.
      
      Reviewers: ruiu
      
      Subscribers: aprantl, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D34356
      
      llvm-svn: 305811
      f5bb738f
    • Yuka Takahashi's avatar
      [GSoC] Flag value completion for clang · ba5d4af4
      Yuka Takahashi authored
      This is patch for GSoC project, bash-completion for clang.
      
      To use this on bash, please run `source clang/utils/bash-autocomplete.sh`.
      bash-autocomplete.sh is code for bash-completion.
      
      In this patch, Options.td was mainly changed in order to add value class
      in Options.inc.
      
      llvm-svn: 305805
      ba5d4af4
    • Rafael Espindola's avatar
      Prefer -Ttext over linker script values. · 9c0395e3
      Rafael Espindola authored
      I found this while trying to build u-boot. It uses -Ttext in
      combination with linker scripts.
      
      My first reaction was to change the linker scripts to have the correct
      value, but I found that it is actually quite convenient to have -Ttext
      take precedence.
      
      By having just
      
      .text : { *(.text) }
      
      In the script, they can define the text address in a single Makefile
      and pass it to ld with -Ttext and for the C code with
      -DFoo=value. Doing the same with linker scripts would require them to
      be generated during the build.
      
      llvm-svn: 305766
      9c0395e3
  7. Jun 19, 2017
  8. Jun 17, 2017
  9. Jun 16, 2017
    • Eric Beckmann's avatar
      Switch external cvtres.exe for llvm's own resource library. · d135e8c0
      Eric Beckmann authored
      In this patch, I flip the switch in DriverUtils from using the external
      cvtres.exe tool to using the Windows Resource library in llvm.
      
      I also fixed a bug where .rsrc sections were marked as discardable
      memory and therefore were placed in the wrong order in the final PE.
      
      Furthermore, I modified WindowsResource to write the coff directly to a
      memory buffer instead of to file, also had it use the machine types
      already declared in COFF.h instead creating my own enum.
      
      Finally, I flipped the switch to allow all unit tests that had
      previously run only on windows due to a winres dependency to run
      cross-platform.
      
      Reviewers: zturner, ruiu
      
      Subscribers: llvm-commits, hiraditya
      
      Differential Revision: https://reviews.llvm.org/D34265
      
      llvm-svn: 305592
      d135e8c0
Loading