scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | README | LICENSE

commit 986419f0db6143c87f60da6d5e8698dbc6e037f0
parent 7f7b41900c143b0cf049ee32a160f19af890dfb4
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Sun, 19 Jan 2020 14:06:00 +0100

ld: Remove -D flag

It was adding too much noise to the code
and it is not needed at all.

Diffstat:
Msrc/cmd/ld/ld.h | 1-
Msrc/cmd/ld/main.c | 4----
Msrc/cmd/ld/pass2.c | 11-----------
3 files changed, 0 insertions(+), 16 deletions(-)

diff --git a/src/cmd/ld/ld.h b/src/cmd/ld/ld.h @@ -33,7 +33,6 @@ extern int Xflag; extern int rflag; extern int dflag; extern int gflag; -extern char *Dflag; extern char *output, *entry; extern Obj *objhead; extern Segment debug, text, rodata, data, bss; diff --git a/src/cmd/ld/main.c b/src/cmd/ld/main.c @@ -17,7 +17,6 @@ int rflag; /* preserve relocation bits */ int dflag; /* define common even with rflag */ int gflag; /* preserve debug symbols */ int nmagic; /* nmagic output */ -char *Dflag; /* size of data */ char *filename, *membname; @@ -161,9 +160,6 @@ main(int argc, char *argv[]) case 'e': entry = nextarg(&ap, &av); break; - case 'D': - Dflag = nextarg(&ap, &av); - break; default: usage(); } diff --git a/src/cmd/ld/pass2.c b/src/cmd/ld/pass2.c @@ -49,15 +49,4 @@ pass2(int argc, char *argv[]) mksecs(); mksegs(); - - if (Dflag) { - n = strtoull(Dflag, &end, 0); - if (n == ULLONG_MAX || *end != '\0') { - error("incorrect -D value"); - exit(EXIT_FAILURE); - } - - if (n > data.size) - data.size = n; - } }