From 10f6d88ba16fc320612ac146e6427b4207dbb50d Mon Sep 17 00:00:00 2001 From: ceriel Date: Thu, 5 Feb 1987 14:11:46 +0000 Subject: [PATCH] *** empty log message *** --- util/led/Makefile | 2 ++ util/led/const.h | 1 + util/led/main.c | 10 +++++++++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/util/led/Makefile b/util/led/Makefile index 916fa5efb..d1f2f16de 100644 --- a/util/led/Makefile +++ b/util/led/Makefile @@ -29,6 +29,8 @@ led: $(OFILES) install:led cp led $(LIBDIR)/em_led + cp led.6 $(EM)/man/led.6 + cp ack.out.5 $(EM)/man/ack.out.5 cmp: led cmp led $(LIBDIR)/em_led diff --git a/util/led/const.h b/util/led/const.h index 7252e9c84..445122f79 100644 --- a/util/led/const.h +++ b/util/led/const.h @@ -10,6 +10,7 @@ typedef int bool; #define RFLAG 0x01 /* -r flag given. */ #define SFLAG 0x02 /* -s flag given. */ +#define CFLAG 0x04 /* -c flag given. */ #define PLAIN 0 /* Input file is a normal file. */ #define ARCHIVE 1 /* Input file is an archive. */ diff --git a/util/led/main.c b/util/led/main.c index a372d85b7..3b7e23765 100644 --- a/util/led/main.c +++ b/util/led/main.c @@ -131,6 +131,13 @@ first_pass(argv) fatal("usage: -b
:"); setbase(sectno, number(++argp)); break; + case 'c': + /* + * Might be used in combination with 'r', to produce + * relocatable output, but handle commons now. + */ + flagword |= CFLAG; + break; #ifndef NDEBUG case 'd': DEB = 1; @@ -413,10 +420,11 @@ complete_sections() outsect[sectindex].os_foff = foff; foff += outsect[sectindex].os_flen; - if (flagword & RFLAG) + if ((flagword & RFLAG) && !(flagword & CFLAG)) continue; outsect[sectindex].os_size += sect_comm[sectindex]; + if (flagword & RFLAG) outsect[sectindex].os_lign = tstbit(sectindex, lignmap) ? sect_lign[sectindex] : 1; if (tstbit(sectindex, basemap)) {