From 49af3bfc627331f33efed10804db63687a1ddd7a Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Sun, 22 Sep 2024 23:39:22 -0400 Subject: multitude of mld fixes, add entrypoint --- mld/main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'mld/main.c') diff --git a/mld/main.c b/mld/main.c index 3dd5b5c..675a056 100644 --- a/mld/main.c +++ b/mld/main.c @@ -10,6 +10,7 @@ void help(void) { printf("options:\n"); printf("\t-h\t\tprints this help message\n"); printf("\t-o \tselect a output file destination\n"); + printf("\t-f\t\tmake this binary freestanding (no runtime)\n"); } int main(int argc, char **argv) { @@ -18,11 +19,12 @@ int main(int argc, char **argv) { .in_files = NULL, .in_count = 0, .out_file = "a.out", + .freestanding = false, }; int c; - while ((c = getopt(argc, argv, "ho:")) != 1) { + while ((c = getopt(argc, argv, "ho:f")) != 1) { switch(c) { case 'h': help(); @@ -30,6 +32,9 @@ int main(int argc, char **argv) { case 'o': args.out_file = optarg; break; + case 'f': + args.freestanding = true; + break; case '?': return M_ERROR; default: -- cgit v1.2.3-freya