From 04445364fc9123ad40bf5581ffa4c5afac4c57dc Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Wed, 21 Sep 2016 15:56:19 -0700 Subject: incbin: if we have to fread(), try to do it only once... If we can't mmap a file and instead have to fread(), if the data is small enough that we can reasonably accomodate it in a memory buffer, then just read it once. It seems rather unlikely that very large files would be used with TIMES anyway. Also note: the previous comment about nasm_file_size[_by_path]() being invoked twice was spurious; it does not actually happen. Signed-off-by: H. Peter Anvin --- test/incbin.asm | 1 + 1 file changed, 1 insertion(+) (limited to 'test') diff --git a/test/incbin.asm b/test/incbin.asm index 634302ea..20aa4d9f 100644 --- a/test/incbin.asm +++ b/test/incbin.asm @@ -1,5 +1,6 @@ db '*** ONCE ***', 0Ah incbin "incbin.data",32 + section more start=0x1000000 db '*** TWELVE ***', 0Ah times 12 incbin "incbin.data",32 -- cgit v1.2.3