浏览代码

+ WebAssembly internal linker: added check for relocations increasing section
data's size. The check is behind ifdef EXTDEBUG_WASM, because it slows down
compilation.

Nikolay Nikolov 1 周之前
父节点
当前提交
7cdcf03910
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      compiler/ogwasm.pas

+ 4 - 0
compiler/ogwasm.pas

@@ -5520,6 +5520,10 @@ implementation
               end
             else
               internalerror(2024010110);
+{$ifdef EXTDEBUG_WASM}
+            if (FRelocationPass=2) and assigned(objsec.data) and (objsec.data.size<>objsec.size) then
+              internalerror(2025100101,'relocation increased section''s data size: '+objreloc.ToString);
+{$endif}
           end;
       end;