summary refs log tree commit diff
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin@c9x.me>2022-02-11 09:14:17 +0100
committerQuentin Carbonneaux <quentin@c9x.me>2022-02-11 09:14:17 +0100
commite092473be1cf48216085f8349677cefc8f19b3b2 (patch)
tree8a6ceda3741e57a83b6a7caa34960df33ad8e37f
parent7aceb24c50276322f79e7d13cbc6c9cd9251f447 (diff)
downloadroux-e092473be1cf48216085f8349677cefc8f19b3b2.tar.gz
document the automatic use of bss
-rw-r--r--doc/il.txt15
1 files changed, 9 insertions, 6 deletions
diff --git a/doc/il.txt b/doc/il.txt
index 8713e0d..994729e 100644
--- a/doc/il.txt
+++ b/doc/il.txt
@@ -224,12 +224,15 @@ the section flag is platform dependent and we refer the
 user to the documentation of their assembler and linker
 for relevant information.
 
-    export section ".bss"
-    data $zerobuf = { z 1024 }
+    section ".init_array"
+    data $.init.f = { l $f }
 
-Example uses of the section flag include adding function
-pointers to a global initialization list, or storing a
-zeroed object in the BSS section, as depicted above.
+The section flag can be used to add function pointers to
+a global initialization list, as depicted above.  Note
+that some platforms provide a BSS section that can be
+used to minimize the footprint of uniformly zeroed data.
+When this section is available, QBE will automatically
+make use of it and no section flag is required.
 
 The section and export linkage flags should each appear
 at most once in a definition.  If multiple occurrences
@@ -244,7 +247,7 @@ data, and functions.  Aggregate types are never exported
 and do not compile to any code.  Data and function
 definitions have file scope and are mutually recursive
 (even across IL files).  Their visibility can be controlled
-using the `export` keyword.
+using linkage flags.
 
 ~ Aggregate Types
 ~~~~~~~~~~~~~~~~~