Skip to content
  1. Dec 16, 2013
    • Rui Ueyama's avatar
      [PECOFF] Set OrdinalBase field in the export table. · 69b899a1
      Rui Ueyama authored
      OrdinalBase is an addend to the ordinals. We used to always set 1 to the field.
      Although it produced a valid a DLL export table, it'd be a waste if the first
      ordinal does not start with 1 -- we had to have NULL fields at the beginning of
      the export address table. By setting the ordinal base, we can eliminate the
      NULL fields.
      
      llvm-svn: 197367
      69b899a1
    • Rui Ueyama's avatar
      [PECOFF] Make it possible to specify export ordinals. · fe1b3c09
      Rui Ueyama authored
      You can specify exported function's ordinal by /export:func,@<number> command
      line option, but LLD ignored the option until now. This patch implements the
      feature.
      
      Ordinal is basically the index into the exported function address table. So,
      for example, if /export:foo,@42 is specified, the linker writes foo's address
      to 42th entry in the address table. Windows supports import-by-ordinal; you
      can not only import a function by name, but by its ordinal. If you want to
      allow your DLL users to import your functions by their ordinals, you need to
      make sure that your functions are always exported with the same ordinals.
      This is the feature for that situation.
      
      llvm-svn: 197364
      fe1b3c09
  2. Dec 14, 2013
  3. Dec 13, 2013
    • Rui Ueyama's avatar
      [PECOFF] Parse /export optional arguments. · fa561713
      Rui Ueyama authored
      /EXPORT command line option can take an ordinal, NONAME flag, and DATA flag.
      This patch is to parse these optional arguments.
      
      llvm-svn: 197217
      fa561713
    • Rui Ueyama's avatar
      Run clang-format on the new files. · c4123a57
      Rui Ueyama authored
      I should have run it before submitting but forgot to do that. Doing it now...
      
      llvm-svn: 197214
      c4123a57
    • Rui Ueyama's avatar
      [PECOFF] Align .edata fields on natural boundaries. · 3a136547
      Rui Ueyama authored
      The only data in .edata whose length varies is the string. This patch moves
      all the strings to the end of the section, so that 16-bit or 32-bit integers
      are aligned on correct boundaries.
      
      llvm-svn: 197213
      3a136547
    • Rui Ueyama's avatar
      [PECOFF] Create .edata section for the DLL export table. · c91c24e3
      Rui Ueyama authored
      This is the first patch to emit data for the DLL export table. The DLL export
      table is the data used by the Windows loader to find the address of exported
      function from DLL. With this patch, LLD is able to emit a valid DLL export
      table which the Windows loader can interpret and load.
      
      The data structure of the DLL export table is described in the Microsoft
      PE/COFF Specification, section 5.3.
      
      DLL support is not complete yet; the linker needs to emit an import library
      for a DLL, otherwise the linker cannot link against the DLL. We also do not
      support export-only-by-ordinal yet.
      
      llvm-svn: 197212
      c91c24e3
Loading