[llvm-commits] CVS: llvm/docs/BytecodeFormat.html LangRef.html

Anton Korobeynikov asl at math.spbu.ru
Thu Sep 14 11:24:06 PDT 2006



Changes in directory llvm/docs:

BytecodeFormat.html updated: 1.52 -> 1.53
LangRef.html updated: 1.156 -> 1.157
---
Log message:

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.


---
Diffs of the changes:  (+46 -8)

 BytecodeFormat.html |   23 ++++++++++++++++-------
 LangRef.html        |   31 ++++++++++++++++++++++++++++++-
 2 files changed, 46 insertions(+), 8 deletions(-)


Index: llvm/docs/BytecodeFormat.html
diff -u llvm/docs/BytecodeFormat.html:1.52 llvm/docs/BytecodeFormat.html:1.53
--- llvm/docs/BytecodeFormat.html:1.52	Thu Apr 20 00:05:12 2006
+++ llvm/docs/BytecodeFormat.html	Thu Sep 14 13:23:26 2006
@@ -1025,7 +1025,8 @@
     <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 @@
       <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 @@
       <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 @@
     </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>
@@ -2148,7 +2157,7 @@
 <a href="mailto:rspencer at x10sys.com">Reid Spencer</a> and <a
  href="mailto:sabre at nondot.org">Chris Lattner</a><br>
 <a href="http://llvm.org">The LLVM Compiler Infrastructure</a><br>
-Last modified: $Date: 2006/04/20 05:05:12 $
+Last modified: $Date: 2006/09/14 18:23:26 $
 </address>
 </body>
 </html>


Index: llvm/docs/LangRef.html
diff -u llvm/docs/LangRef.html:1.156 llvm/docs/LangRef.html:1.157
--- llvm/docs/LangRef.html:1.156	Fri Sep  8 01:34:02 2006
+++ llvm/docs/LangRef.html	Thu Sep 14 13:23:26 2006
@@ -439,6 +439,35 @@
   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>"
@@ -3880,7 +3909,7 @@
 
   <a href="mailto:sabre at nondot.org">Chris Lattner</a><br>
   <a href="http://llvm.org">The LLVM Compiler Infrastructure</a><br>
-  Last modified: $Date: 2006/09/08 06:34:02 $
+  Last modified: $Date: 2006/09/14 18:23:26 $
 </address>
 </body>
 </html>






More information about the llvm-commits mailing list