From e4e7b490137111ebfa90c231a0d4850b4daf3e1e Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Sun, 18 Apr 2004 13:00:07 -0700 Subject: [PATCH] Top-level symbols are always addressable, since they are visible to the linker. This fixes the issue where we might otherwise believe that they are constant when nobody assigns to them. --- symbol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/symbol.c b/symbol.c index e355816c..4f804ac0 100644 --- a/symbol.c +++ b/symbol.c @@ -312,7 +312,7 @@ void bind_symbol(struct symbol *sym, struct ident *ident, enum namespace ns) scope = block_scope; if (ns != NS_TYPEDEF && toplevel(scope)) { - sym->ctype.modifiers |= MOD_TOPLEVEL; + sym->ctype.modifiers |= MOD_TOPLEVEL | MOD_ADDRESSABLE; if (sym->ctype.modifiers & MOD_STATIC) scope = file_scope; } -- 2.11.4.GIT