# HG changeset patch # User lost # Date 1232901931 0 # Node ID b972e45b5e07b9353d2a8a60922b21c5ba213f63 # Parent 5276565799bdcf7704c2aa65ed3a7cd59d5023dc Don't generate a preamble for a zero-sized section diff -r 5276565799bd -r b972e45b5e07 lwlink/trunk/src/output.c --- a/lwlink/trunk/src/output.c Sat Jan 24 07:18:01 2009 +0000 +++ b/lwlink/trunk/src/output.c Sun Jan 25 16:45:31 2009 +0000 @@ -80,6 +80,11 @@ // no output for a BSS section continue; } + if (sectlist[sn].ptr -> codesize == 0) + { + // don't generate output for a zero size section + continue; + } // write a preamble buf[0] = 0x00; buf[1] = sectlist[sn].ptr -> codesize >> 8;