From c440296ae8b0f171fc0f7df311831954c9992162 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Mon, 24 May 2021 15:41:22 +0100 Subject: Add `@(link_section=)` for global variables --- src/check_decl.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/check_decl.cpp') diff --git a/src/check_decl.cpp b/src/check_decl.cpp index 0aef40546..323de6d43 100644 --- a/src/check_decl.cpp +++ b/src/check_decl.cpp @@ -934,6 +934,9 @@ void check_global_variable_decl(CheckerContext *ctx, Entity *&e, Ast *type_expr, if (ac.link_name.len > 0) { e->Variable.link_name = ac.link_name; } + if (ac.link_section.len > 0) { + e->Variable.link_section = ac.link_section; + } if (e->Variable.is_foreign || e->Variable.is_export) { String name = e->token.string; -- cgit v1.2.3