Properly export symbols.

This commit is contained in:
David Given 2016-10-29 23:52:17 +02:00
parent 8c3670483f
commit ca5b6e07bb

View file

@ -37,6 +37,9 @@ void symbol_declare(const char* name, bool is_exported, bool is_proc)
else if (s->section != SECTION_TEXT) else if (s->section != SECTION_TEXT)
fatal("section mismatch for '%s'", name); fatal("section mismatch for '%s'", name);
} }
if (is_exported)
fprintf(outputfile, ".extern %s\n", platform_label(name));
} }
struct symbol* symbol_walk(symbol_walker_t* cb, void* user) struct symbol* symbol_walk(symbol_walker_t* cb, void* user)