Add @(link_section=<string>) for global variables

This commit is contained in:
gingerBill
2021-05-24 15:41:22 +01:00
parent 79f115d6a7
commit c440296ae8
5 changed files with 18 additions and 0 deletions
+3
View File
@@ -14880,6 +14880,9 @@ void lb_generate_code(lbGenerator *gen) {
LLVMSetLinkage(g.value, LLVMInternalLinkage);
}
}
if (e->Variable.link_section.len > 0) {
LLVMSetSection(g.value, alloc_cstring(permanent_allocator(), e->Variable.link_section));
}
lbGlobalVariable var = {};
var.var = g;