ref: 8d5f6bbcb69f614eb5a8eae090cfa10981cd373a
parent: 586aa6a2ddc5ce107bf53437443596b633d02de5
author: Roberto E. Vargas Caballero <[email protected]>
date: Sun Jan 19 09:06:00 EST 2020
ld: Remove -D flag It was adding too much noise to the code and it is not needed at all.
--- a/src/cmd/ld/ld.h
+++ b/src/cmd/ld/ld.h
@@ -33,7 +33,6 @@
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;
--- a/src/cmd/ld/main.c
+++ b/src/cmd/ld/main.c
@@ -17,7 +17,6 @@
int dflag; /* define common even with rflag */
int gflag; /* preserve debug symbols */
int nmagic; /* nmagic output */
-char *Dflag; /* size of data */
char *filename, *membname;
@@ -160,9 +159,6 @@
break;
case 'e':
entry = nextarg(&ap, &av);
- break;
- case 'D':
- Dflag = nextarg(&ap, &av);
break;
default:
usage();
--- a/src/cmd/ld/pass2.c
+++ b/src/cmd/ld/pass2.c
@@ -49,15 +49,4 @@
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;
- }
}