listing.c: show [ssss] for a segment instead of a bogus address

There is no point in showing a number of a relative segment, so just
show [ssss]; even if there is a possible segment offset it is
linker-dependent and output format dependent.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
H. Peter Anvin 2017-05-01 15:32:37 -07:00
parent 217e714e6b
commit 571592ea63

View File

@ -222,9 +222,16 @@ static void list_output(const struct out_data *data)
break;
}
case OUT_ADDRESS:
case OUT_SEGMENT:
list_address(offset, "[]", data->toffset, size);
list_address(offset, "[]", data->toffset, size);
break;
case OUT_SEGMENT:
q[0] = '[';
memset(q+1, 's', size << 1);
q[(size << 1)+1] = ']';
q[(size << 1)+2] = '\0';
list_out(offset, q);
offset += size;
break;
case OUT_RELADDR:
list_address(offset, "()", data->toffset, size);
break;