diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2006-09-14 18:23:27 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2006-09-14 18:23:27 +0000 |
commit | b74ed07bfd3af42331b1964c24c39912610a08f4 (patch) | |
tree | 23784905a2ba3e6ebe644e62b54658950cbf8fa1 /docs | |
parent | a17cf0a7e2d9aa6d9bb6f9461a6fa8a9ac02bab4 (diff) | |
download | llvm-b74ed07bfd3af42331b1964c24c39912610a08f4.tar.gz llvm-b74ed07bfd3af42331b1964c24c39912610a08f4.tar.bz2 llvm-b74ed07bfd3af42331b1964c24c39912610a08f4.tar.xz |
Adding dllimport, dllexport and external weak linkage types.
DLL* linkages got full (I hope) codegeneration support in C & both x86
assembler backends.
External weak linkage added for future use, we don't provide any
codegeneration, etc. support for it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30374 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs')
-rw-r--r-- | docs/BytecodeFormat.html | 21 | ||||
-rw-r--r-- | docs/LangRef.html | 29 |
2 files changed, 44 insertions, 6 deletions
diff --git a/docs/BytecodeFormat.html b/docs/BytecodeFormat.html index 51177492a9..2b856a7163 100644 --- a/docs/BytecodeFormat.html +++ b/docs/BytecodeFormat.html @@ -1025,7 +1025,8 @@ follows. </td> <tr> <td><a href="#bit">bit(2-4)</a></td> <td class="td_left">Linkage type: 0=External, 1=Weak, -2=Appending, 3=Internal, 4=LinkOnce</td> + 2=Appending, 3=Internal, 4=LinkOnce, 5=DllImport, + 6=DllExport, 7=ExternWeak</td> </tr> <tr> <td><a href="#bit">bit(5-31)</a></td> @@ -1136,13 +1137,16 @@ href="#uint32_vbr">uint32_vbr</a> that describes the function.</p> <td><a href="#bit">bit(4)</a></td> <td class="td_left">If this bit is set to 1, the indicated function is external, and there is no <a href="#functiondefs">Function Definiton - Block</a> in the bytecode file for the function.</td> + Block</a> in the bytecode file for the function. If the function is + external and has <tt>dllimport or extern_weak</tt> linkage additional + field in the extension word is used to indicate the actual linkage + type.</td> </tr> <tr> <td><a href="#bit">bit(5-30)</a></td> <td class="td_left">Type slot number of type for the function.</td> </tr> - <tr> + <tr> <td><a href="#bit">bit(31)</a></td> <td class="td_left">Indicates whether an extension word follows.</td> </tr> @@ -1171,7 +1175,12 @@ follows with the following fields:</p> <td class="td_left">If this bit is set, a SectionID follows this vbr.</td> </tr> <tr> - <td><a href="#bit">bit(11-31)</a></td> + <td><a href="#bit">bit(11-12)</a></td> + <td class="td_left">Linkage type for external functions. 0 - External + linkage, 1 - DLLImport linkage, 2 - External weak linkage.</td> + </tr> + <tr> + <td><a href="#bit">bit(13-31)</a></td> <td class="td_left">Currently unassigned.</td> </tr> </tbody> @@ -1410,8 +1419,8 @@ size<br> </tr> <tr> <td><a href="#uint32_vbr">uint32_vbr</a></td> - <td class="td_left">The linkage type of the function: 0=External, -1=Weak, 2=Appending, 3=Internal, 4=LinkOnce<sup>1</sup></td> + <td class="td_left">The linkage type of the function: 0=External, 1=Weak, +2=Appending, 3=Internal, 4=LinkOnce, 5=DllImport, 6=DllExport<sup>1</sup></td> </tr> <tr> <td><a href="#block">block</a></td> diff --git a/docs/LangRef.html b/docs/LangRef.html index 232b468332..5ae8472ffd 100644 --- a/docs/LangRef.html +++ b/docs/LangRef.html @@ -439,6 +439,35 @@ All Global Variables and Functions have one of the following types of linkage: visible, meaning that it participates in linkage and can be used to resolve external symbol references. </dd> + + <dt><tt><b><a name="linkage_externweak">extern_weak</a></b></tt>: </dt> + + <dd>"<tt>extern_weak</tt>" TBD + </dd> + + <p> + The next two types of linkage are targeted for Microsoft Windows platform + only. They are designed to support importing (exporting) symbols from (to) + DLLs. + </p> + + <dt><tt><b><a name="linkage_dllimport">dllimport</a></b></tt>: </dt> + + <dd>"<tt>dllimport</tt>" linkage causes the compiler to reference a function + or variable via a global pointer to a pointer that is set up by the DLL + exporting the symbol. On Microsoft Windows targets, the pointer name is + formed by combining <code>_imp__</code> and the function or variable name. + </dd> + + <dt><tt><b><a name="linkage_dllexport">dllexport</a></b></tt>: </dt> + + <dd>"<tt>dllexport</tt>" linkage causes the compiler to provide a global + pointer to a pointer in a DLL, so that it can be referenced with the + <tt>dllimport</tt> attribute. On Microsoft Windows targets, the pointer + name is formed by combining <code>_imp__</code> and the function or variable + name. + </dd> + </dl> <p><a name="linkage_external">For example, since the "<tt>.LC0</tt>" |