浏览代码

* don't write R_WASM_TABLE_INDEX_I32 relocations, always use R_WASM_FUNCTION_OFFSET_I32 in debug sections

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

+ 1 - 1
compiler/ogwasm.pas

@@ -1288,7 +1288,7 @@ implementation
                             WriteUleb(relout,TWasmObjSection(objrel.objsection).SegSymIdx);
                           WriteSleb(relout,objrel.Addend);  { addend to add to the address }
                         end
-                      else if IsExternalFunction(objrel.symbol) or (objrel.symbol.typ=AT_FUNCTION) then
+                      else if (IsExternalFunction(objrel.symbol) or (objrel.symbol.typ=AT_FUNCTION)) and not objsec.IsDebug then
                         begin
                           Inc(relcount^);
                           WriteByte(relout,Ord(R_WASM_TABLE_INDEX_I32));