+ // Check to see if this is a common symbol; if so, try to add
+ // it to the hash list...
+ if (value != 0)
+ {
+ // Actually, we need to convert this to a BSS symbol,
+ // increase the size of the BSS segment for this object, &
+ // add it to the hash list
+ uint32_t valueSave = value;
+ uint32_t bssLocation = Ofile->o_header.tsize + Ofile->o_header.dsize + Ofile->o_header.bsize;
+ Ofile->o_header.bsize += value;
+ type |= T_BSS;
+ value = bssLocation;
+ PutLong(sfix + 4, type);
+ PutLong(sfix + 8, value);
+
+ // Also need to reset the size of the object's BSS section:
+ int i = GetObjSegSizeIndex(Ofile->o_name);
+//printf("AddSymbols: obj_segsize[%i][BSS] = %d (value = %d)\n", i, obj_segsize[i][BSS], value);
+ obj_segsize[i][BSS] += valueSave; // need to realign the section, but only *after* all the common symbols have been added from this unit... !!! FIX !!!
+// obj_segsize[obj_index][2] = (GetLong(ptr + 12) + secalign) & ~secalign;
+
+ if (vflag > 1)
+ printf("AddSymbols: Resetting common label to BSS label\n");
+
+ if (AddSymbolToHashList(&htable[GetHash(sstr + index)],
+ sstr + index, Ofile, value, type))
+ return 1; // Error if addition failed
+ }