Skip to content
  1. Sep 24, 2013
    • Rui Ueyama's avatar
      [PECOFF] Add /nodefaultlib command line option. · f062c84a
      Rui Ueyama authored
      llvm-svn: 191254
      f062c84a
    • Rui Ueyama's avatar
      [PECOFF] Do not allow space to separate command line option and its value. · 456740c7
      Rui Ueyama authored
      We used to support both Windows and Unix style command line options. In Windows
      style, an option and its value are separated by ":" (colon). In Unix, separator
      is a space. Accepting both styles were convenient, but we can no longer allow
      Unix style because I found that can be ambiguous.
      
      For example, /nodefaultlib option takes an optional argument. In Windows style
      it's going to be something like "/nodefaultlib:foo". There's no ambiguity what
      "foo" means. However, if the option is "/nodefaultlib foo", "foo" can be
      interpreted either an optional argument for "/nodefaultlib" or an input file
      "foo.obj". We should just stop accepting the non-standard command line style.
      
      llvm-svn: 191247
      456740c7
    • Rui Ueyama's avatar
      [PECOFF] Ignore /delay and /delayload options. · 5c59ab7f
      Rui Ueyama authored
      These options are to enable DLL delay loading. If enabled, DLL is loaded
      at run time by a helper routine when a function in the DLL is actually called
      for the first time, instead of making the Windows loader to load all DLLs at
      startup time. This should shorten startup delay if an executable have many
      imported symbols.
      
      The linker needs to create a "delayed import table" and link delayimp.lib in
      which helper functions are defined to support the feature.
      
      For now, we just ignore the options, so that the linker does not complain when
      it sees these options. We want to support them in the future.
      
      llvm-svn: 191232
      5c59ab7f
  2. Sep 23, 2013
  3. Sep 20, 2013
  4. Sep 19, 2013
  5. Sep 18, 2013
  6. Sep 17, 2013
  7. Sep 16, 2013
  8. Sep 14, 2013
  9. Sep 13, 2013
    • Rui Ueyama's avatar
      Revert "[PECOFF] Allocate storage for .drective in the reader ..." · ec9bb694
      Rui Ueyama authored
      This reverts r189881 because that patch caused dangling StringRefs.
      
      llvm-svn: 190725
      ec9bb694
    • Rui Ueyama's avatar
      [PECOFF] Fix alignment bug. · a8ce9529
      Rui Ueyama authored
      There was a bug that if a section has an alignment requirement and there are
      multiple symbols at offset 0 in the section, only the last atom at offset 0
      would be aligned properly. That bug would move only the last symbol to an
      alignment boundary, leaving other symbols unaligned, although they should be at
      the same location. That caused a mysterious SEGV error of the resultant
      executable.
      
      With this patch, we manage all symbols at the same location properly, rather
      than keeping the last one.
      
      llvm-svn: 190724
      a8ce9529
    • Rui Ueyama's avatar
      [PECOFF] Fix atom default alignment. · 1ea9b977
      Rui Ueyama authored
      Alignment(1) does not mean that the atom should be aligned on a 1 byte
      boundary but on a 2^1 boundary. So, atoms without any specific alignment
      requirements should have Alignment(0).
      
      llvm-svn: 190723
      1ea9b977
    • Shankar Easwaran's avatar
      [lld][ELF] Handle multiple weak symbols · 2a92c18b
      Shankar Easwaran authored
      This handles multiple weak symbols which appear back to back. This fix is needed
      which otherwise will lead to symbols getting initialized to arbitrary values.
      
      There was a constructor/destructor test that really triggered this to be fixed
      on X86_64.
      
      Adds a test.
      
      llvm-svn: 190658
      2a92c18b
  10. Sep 12, 2013
    • Rui Ueyama's avatar
      [PECOFF] Handle weak external symbols. · 6f325496
      Rui Ueyama authored
      Used the fallback mechanism to implement COFF weak external symbols.
      
      llvm-svn: 190633
      6f325496
    • Rui Ueyama's avatar
      [PECOFF] Add a field for machine type to PECOFFLinkingContext. · 98896ed1
      Rui Ueyama authored
      So that we can determine what the target architecture is. Adding this
      field does not mean that we are going to support non-i386 architectures
      soon; there are many things to do to support them, and I'm focusing on
      i386 now. But this is the first step toward multi architecture support.
      
      llvm-svn: 190627
      98896ed1
    • Rui Ueyama's avatar
      Add a fallback mechanism for undefined atom. · e5416ec2
      Rui Ueyama authored
      In COFF, an undefined symbol can have up to one alternative name. If a symbol
      is resolved by its regular name, then it's linked normally. If a symbol is not
      found in any input files, all references to the regular name are resolved using
      the alternative name. If the alternative name is not found, it's a link error.
      This mechanism is called "weak externals".
      
      To support this mechanism, I added a new member function fallback() to undefined
      atom. If an undefined atom has the second name, fallback() returns a new undefined
      atom that should be used instead of the original one to resolve undefines. If it
      does not have the second name, the function returns nullptr.
      
      Differential Revision: http://llvm-reviews.chandlerc.com/D1550
      
      llvm-svn: 190625
      e5416ec2
    • Shankar Easwaran's avatar
      [lld][LayoutPass] change comments to reflect the sort order · d6d1b529
      Shankar Easwaran authored
      llvm-svn: 190612
      d6d1b529
Loading