Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Stock cflow doesn't allow static symbol to be main function using '-m' argument, this fixed that.
diff --git a/src/symbol.c b/src/symbol.c
index 567e458..2810540 100644
--- a/src/symbol.c
+++ b/src/symbol.c
@@ -131,6 +131,8 @@ install(char *name, int flags)
ident_change_storage(Symbol *sp, enum storage storage)
+ if (!strcmp(sp->name, start_name))
+ storage = ExternStorage;
if (sp->storage == storage)
if (sp->storage == StaticStorage)

This comment has been minimized.

Copy link

@ngoctint1lvc ngoctint1lvc commented Mar 22, 2020

Really helpful, thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment