qbe

Internal scc patchset buffer for QBE
Log | Files | Refs | README | LICENSE

commit 9fc0394d7ed2b86be9eae7f2b410e83fbe3ae497
parent 2ca6fb25a238842418019a3f9ee8d1beb1327f7e
Author: Paul Ouellette <oue.paul18@gmail.com>
Date:   Thu, 10 Feb 2022 20:27:29 -0500

doc: fix name of export linkage flag

Diffstat:
Mdoc/il.txt | 9++++-----
1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/doc/il.txt b/doc/il.txt @@ -202,7 +202,7 @@ constants by the linker. `bnf LINKAGE := - 'extern' + 'export' | 'section' SECNAME | 'section' SECNAME SECFLAGS @@ -213,11 +213,10 @@ Function and data definitions (see below) can specify linkage information to be passed to the assembler and eventually to the linker. -The `extern` linkage flag marks the defined item as +The `export` linkage flag marks the defined item as visible outside the current file's scope. If absent, the symbol can only be referred to locally. Functions -compiled by QBE and called from C need to have extern -linkage. +compiled by QBE and called from C need to be exported. A `section` flag can be specified to tell the linker to put the defined item in a certain section. The use of @@ -232,7 +231,7 @@ 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 and extern linkage flags should each appear +The section and export linkage flags should each appear at most once in a definition. If multiple occurrences are present, QBE is free to use any.