#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. */
fatal("usage: -b<section number>:<base>");
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;
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)) {