- Dec 16, 2013
-
-
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
-
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
-
- Dec 14, 2013
-
-
Rui Ueyama authored
Symbol names exported from a DLL should be undecorated, not prefixed by an underscore ones. llvm-svn: 197307
-
Rui Ueyama authored
llvm-svn: 197306
-
- Dec 13, 2013
-
-
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
-
Rui Ueyama authored
I should have run it before submitting but forgot to do that. Doing it now... llvm-svn: 197214
-
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
-
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
-