소스 검색

* wasm32 obj writer: do the relocations before writing the code, data and debug sections

Nikolay Nikolov 3 년 전
부모
커밋
e959422753
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      compiler/ogwasm.pas

+ 2 - 1
compiler/ogwasm.pas

@@ -1915,6 +1915,8 @@ implementation
         MaybeAddDebugSectionToSymbolTable('.debug_aranges',wcstDebugAranges,debug_aranges_section_nr);
         MaybeAddDebugSectionToSymbolTable('.debug_ranges',wcstDebugRanges,debug_ranges_section_nr);
 
+        DoRelocations;
+
         if segment_count>0 then
           begin
             WriteUleb(FWasmSections[wsiData],segment_count);
@@ -1974,7 +1976,6 @@ implementation
         MaybeWriteDebugSection('.debug_aranges',wcstDebugAranges);
         MaybeWriteDebugSection('.debug_ranges',wcstDebugRanges);
 
-        DoRelocations;
         WriteRelocations;
 
         WriteSymbolTable;