backend: psas inslen == 0 to the backend for the INCBIN case

An INCBIN "instruction" can be enormous (up to an off_t size.)  There
is no reason to burden the rest of the code by widening the inslen and
insoffs fields just for INCBIN, so set inslen == 0 to indicate fields
not valid.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
H. Peter Anvin 2016-09-24 09:53:03 -07:00
parent fa803abc61
commit 96921a5ad8

View file

@ -614,8 +614,16 @@ int64_t assemble(int32_t segment, int64_t start, int bits, iflag_t cp,
}
while (t--) {
/*
* Consider these irrelevant for INCBIN, since it is fully
* possible that these might be (way) bigger than an int
* can hold; there is, however, no reason to widen these
* types just for INCBIN. data.inslen == 0 signals to the
* backend that these fields are meaningless, if at all
* needed.
*/
data.insoffs = 0;
data.inslen = len;
data.inslen = 0;
if (map) {
out_rawdata(&data, map, len);