Skip to content

Instantly share code, notes, and snippets.

Embed
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)
void
ident_change_storage(Symbol *sp, enum storage storage)
{
+ if (!strcmp(sp->name, start_name))
+ storage = ExternStorage;
if (sp->storage == storage)
return;
if (sp->storage == StaticStorage)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.