From 6ca9399ed6bec1a448aef79236670cd3daeb7daf Mon Sep 17 00:00:00 2001 From: Quentin Carbonneaux Date: Mon, 14 Mar 2022 10:58:55 +0100 Subject: output symbol type and size That is not available on osx so I tweaked the gas.c api a little to conditionally output the two directives. --- main.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index ee16a75..74d057d 100644 --- a/main.c +++ b/main.c @@ -19,11 +19,6 @@ static struct TMap { { 0, 0 } }; -enum Asm { - Gasmacho, - Gaself, -}; - char debug['Z'+1] = { ['P'] = 0, /* parsing */ ['M'] = 0, /* memory optimization */ @@ -101,6 +96,7 @@ func(Fn *fn) fn->rpo[n]->link = fn->rpo[n+1]; if (!dbg) { T.emitfn(fn, outf); + gasemitfntail(fn->name, outf); fprintf(outf, "/* end function %s */\n\n", fn->name); } else fprintf(stderr, "\n"); @@ -174,16 +170,7 @@ main(int ac, char *av[]) exit(c != 'h'); } - switch (asmmode) { - case Gaself: - gasloc = ".L"; - gassym = ""; - break; - case Gasmacho: - gasloc = "L"; - gassym = "_"; - break; - } + gasinit(asmmode); do { f = av[optind]; -- cgit 1.4.1