/* Combine two segments, which must be contiguous. If pad is true, it's okay for there to be padding between.  */
static void combine(struct sect *base, struct sect *new, int pad)
/* Combine two segments, which must be contiguous. If pad is true, it's okay for there to be padding between.  */
static void combine(struct sect *base, struct sect *new, int pad)
{
	if (!base->len)
		*base = *new;
	else if (new->len) {
		if (base->vaddr + base->len != new->vaddr) {
			if (pad)
				base->len = new->vaddr - base->vaddr;
			else {
				fprintf(stderr,
					"Non-contiguous data can't be converted.\n");
				exit(1);
			}
		}
		base->len += new->len;
	}
}