فهرست منبع

* align non-code sections with zeros, instead of nops in the nasm asm output
writer, so they match the behaviour of the internal object writer (so it
becomes easier to compare to the binary output of the omf object writer)

git-svn-id: trunk@30472 -

nickysn 10 سال پیش
والد
کامیت
6a7fff644a
1فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 3 1
      compiler/x86/agx86nsm.pas

+ 3 - 1
compiler/x86/agx86nsm.pas

@@ -641,8 +641,10 @@ interface
                       AsmWriteLn(#9'ALIGNB '+tostr(tai_align(hp).aligntype))
                       AsmWriteLn(#9'ALIGNB '+tostr(tai_align(hp).aligntype))
                     else if tai_align_abstract(hp).use_op then
                     else if tai_align_abstract(hp).use_op then
                       AsmWriteLn(#9'ALIGN '+tostr(tai_align(hp).aligntype)+',DB '+tostr(tai_align_abstract(hp).fillop))
                       AsmWriteLn(#9'ALIGN '+tostr(tai_align(hp).aligntype)+',DB '+tostr(tai_align_abstract(hp).fillop))
+                    else if LastSecType in [sec_code,sec_stub,sec_init,sec_fini] then
+                      AsmWriteLn(#9'ALIGN '+tostr(tai_align(hp).aligntype))
                     else
                     else
-                      AsmWriteLn(#9'ALIGN '+tostr(tai_align(hp).aligntype));
+                      AsmWriteLn(#9'ALIGN '+tostr(tai_align(hp).aligntype)+',DB 0');
                  end;
                  end;
              end;
              end;