Skip to content
  1. Dec 03, 2013
  2. Dec 02, 2013
  3. Dec 01, 2013
    • Rui Ueyama's avatar
      [PECOFF] Fix /debug option. · 8de2250a
      Rui Ueyama authored
      /DEBUG option is to make the linker to emit debug information to the resulting
      executable. It's not for enable debugging of the linker itself.
      
      llvm-svn: 196040
      8de2250a
  4. Nov 28, 2013
  5. Nov 27, 2013
    • Rui Ueyama's avatar
      [PECOFF] Improve /merge option handling. · 615b200c
      Rui Ueyama authored
      /MERGE option is a bit complicated for many reasons. Firstly, it takes both
      positive and negative arguments. That means we have to have one of three
      distinctive values (set, clear or unchange) for each permission bit. In this
      patch we represent the three values using two bitmasks.
      
      Secondly, the permissions specified by the parameter is bitwise or-ed with the
      default permissions of a section. There is an exception for that rule; if one
      of READ, WRITE or EXECUTE bit is specified, unspecified bits need to be
      cleared. (So if you specify only WRITE for example, the resulting section will
      not have WRITE nor EXECUTE bits.)
      
      Lastly, multiple /merge options are allowed.
      
      llvm-svn: 195882
      615b200c
    • Rui Ueyama's avatar
      [PECOFF] Implement /merge option. · a5e09c84
      Rui Ueyama authored
      /MERGE:foo=bar command line option merges section foo to section bar. If
      section bar does not exist, foo is just renamed as bar.
      
      llvm-svn: 195856
      a5e09c84
    • Rui Ueyama's avatar
      [PECOFF] Rename getFinalSectionName -> getOutputSectionName. · 951dd1d4
      Rui Ueyama authored
      llvm-svn: 195855
      951dd1d4
    • Rui Ueyama's avatar
      [PECOFF] Fix atom ordinals. · 878a8c90
      Rui Ueyama authored
      Atom ordinals are the indeces in a file. Currently the PECOFF reader assigns
      ordinals for each section, so it's (incorrectly) assigning duplicate ordinals.
      
      llvm-svn: 195852
      878a8c90
    • Rui Ueyama's avatar
      Print a bit more information before aborting. · cd480759
      Rui Ueyama authored
      llvm-svn: 195801
      cd480759
    • Rui Ueyama's avatar
      [PECOFF] Add a generic section writer. · 3e873b05
      Rui Ueyama authored
      Instead of having multiple SectionChunks for each section (.text, .data,
      .rdata and .bss), we could have one chunk writer that can emit any sections.
      This patch does that -- removing all section-sepcific chunk writers and
      replace them with one "generic" writer.
      
      This change should simplify the code because it eliminates similar-but-
      slightly-different classes.
      
      It also fixes an issue in the previous design. Before this patch, we could
      emit only limited set of sections (i.e. .text, .data, .rdata and .bss). With
      this patch, we can emit any sections.
      
      llvm-svn: 195797
      3e873b05
    • Rui Ueyama's avatar
      Revert "WriterPECOFF" · 57b4da58
      Rui Ueyama authored
      This reverts accidental commit r195794.
      
      llvm-svn: 195795
      57b4da58
    • Rui Ueyama's avatar
      WriterPECOFF · 6dc6d18f
      Rui Ueyama authored
      llvm-svn: 195794
      6dc6d18f
  6. Nov 26, 2013
  7. Nov 25, 2013
    • Rui Ueyama's avatar
      [PECOFF] Skip sections with LNK_INFO. · 50e2d7ae
      Rui Ueyama authored
      According to the PE/COFF spec, a section with IMAGE_SCN_LNK_INFO should only
      appear in an object file, and not allowed in an executable. So I believe
      treating it as the same way as IMAGE_SCN_LNK_INFO is the right thing.
      
      llvm-svn: 195692
      50e2d7ae
    • Rui Ueyama's avatar
      [PECOFF] String pointed by StringRef is not always NUL-terminated. · 69cec146
      Rui Ueyama authored
      In order not to overrun a StringRef and copy the trailing garbage, we need to
      set the maximum length to be copied by strncpy.
      
      llvm-svn: 195688
      69cec146
    • Rui Ueyama's avatar
      Early return. · 8b08c379
      Rui Ueyama authored
      llvm-svn: 195663
      8b08c379
    • Rui Ueyama's avatar
      Use range-based for loop. · 17e899c9
      Rui Ueyama authored
      llvm-svn: 195662
      17e899c9
    • Rui Ueyama's avatar
      Indentation. · 5a3804f9
      Rui Ueyama authored
      llvm-svn: 195661
      5a3804f9
    • Rui Ueyama's avatar
      [PECOFF] Move definitions to IdataPass.cpp. · 52b9cbf8
      Rui Ueyama authored
      llvm-svn: 195618
      52b9cbf8
    • Rui Ueyama's avatar
      [PECOFF] Set ordinals to linker internal atoms. · 6194109c
      Rui Ueyama authored
      This patch won't change the output because the layout of linker internal
      atoms is forced by layout-{before,after} references. Ordinals of the linker
      internal atoms are not currently used. (That's why it's working even if there
      are atoms having the same ordinals.)
      
      llvm-svn: 195610
      6194109c
    • Shankar Easwaran's avatar
      [Gnu] Set the defaults in the ELFLinkingContext. · 89d0335a
      Shankar Easwaran authored
      Comment from Rui Ueyema.
      
      llvm-svn: 195598
      89d0335a
    • Shankar Easwaran's avatar
      [Gnu] Ignore unknown arguments, and print message. · 70944784
      Shankar Easwaran authored
      llvm-svn: 195597
      70944784
    • Shankar Easwaran's avatar
      [Gnu] Set the type of binary that lld would generate. · f6ec3faf
      Shankar Easwaran authored
      This is needed before any of the search paths are searched for.
      
      llvm-svn: 195596
      f6ec3faf
    • Rui Ueyama's avatar
      [PECOFF] Change sectionChoice attribute. · 2e36c8de
      Rui Ueyama authored
      Change the attribute from sectionBasedOnContent to sectionCustomRequired
      because its the right attribute for atoms read from COFF files to have.
      COFF atoms should basically be emitted to the section having the same name
      as input. Permissions/attributes should not affect that.
      
      There's no functionality change because the writer doesn't yet use the
      section name. The writer will be modified in a following patch, so that atoms
      are written to its customSectionName()'s section.
      
      llvm-svn: 195595
      2e36c8de
    • Shankar Easwaran's avatar
      [Gnu] -L paths is not positional. · a27fe1c9
      Shankar Easwaran authored
      Looks like -L paths are not positional. They need to be added to a list of
      search paths and those needs to be searched when lld looks for a library.
      
      llvm-svn: 195594
      a27fe1c9
    • Rui Ueyama's avatar
      Fix MSVC buildbot. · ffbf4c39
      Rui Ueyama authored
      llvm-svn: 195593
      ffbf4c39
    • Rui Ueyama's avatar
      [PECOFF] Infer subsystem from the entry point function. · 1a11b3b0
      Rui Ueyama authored
      If /subsystem option is not specified, the linker needs to infer it from the
      entry point function. If "main" or "wmain" is defined, it's a console
      application. If "WinMain" or "wWinMain" is defined, it's a GUI application.
      
      llvm-svn: 195592
      1a11b3b0
    • Shankar Easwaran's avatar
      [InputGraph][Gnu] Add LinkerScript support. · d87a021c
      Shankar Easwaran authored
      This adds LinkerScript support by creating a type Script which is of type
      FileNode in the InputGraph. Once the LinkerScript Parser converts the
      LinkerScript into a sequence of command, the commands are handled by the
      equivalent LinkerScript node for the current Flavor/Target. For ELF, a
      ELFGNULdScript gets created which converts the commands to ELF nodes and ELF
      control nodes(ELFGroup for handling Group nodes).
      
      Since the Inputfile type has to be determined in the Driver, the Driver needs
      to determine the complete path of the file that needs to be processed by the
      Linker. Due to this, few tests have been removed since the Driver uses paths
      that doesnot exist.
      
      llvm-svn: 195583
      d87a021c
  8. Nov 24, 2013
  9. Nov 23, 2013
    • Shankar Easwaran's avatar
      [InputGraph] Add capability to process Hidden nodes. · 67e98f51
      Shankar Easwaran authored
      Hidden nodes could be a result of expansion, where a flavor might decide to keep
      the node that we want to expand but discard it from being processed by the
      resolver.
      
      Verifies with unittests.
      
      llvm-svn: 195516
      67e98f51
    • Shankar Easwaran's avatar
      [InputGraph] Expand InputGraph nodes. · 3ac09bcb
      Shankar Easwaran authored
      Flavors may like to expand InputGraph nodes, when a filenode after parsing
      results in more elements. One such example is while parsing GNU linker scripts.
      The linker scripts after parsing would result in a lot of filenodes and probably
      controlnodes too.
      
      Adds unittests to verify functionality.
      
      llvm-svn: 195515
      3ac09bcb
  10. Nov 22, 2013
  11. Nov 21, 2013
Loading