Browse Source

* wasm internal linker: produce an error if an R_WASM_SECTION_OFFSET_I32 or an
R_WASM_TAG_INDEX_LEB relocations is encountered - these aren't implemented,
and are not required for 'hello, world', so will be done later.

Nikolay Nikolov 1 year ago
parent
commit
e6a68b28b6
1 changed files with 11 additions and 3 deletions
  1. 11 3
      compiler/ogwasm.pas

+ 11 - 3
compiler/ogwasm.pas

@@ -4071,10 +4071,18 @@ implementation
                       else
                       else
                         Writeln('Warning! No object symbol created for ', SymbolTable[RelocIndex].SymName);
                         Writeln('Warning! No object symbol created for ', SymbolTable[RelocIndex].SymName);
                     end;
                     end;
-                  R_WASM_SECTION_OFFSET_I32,
-                  R_WASM_GLOBAL_INDEX_LEB,
-                  R_WASM_TAG_INDEX_LEB:
+                  R_WASM_SECTION_OFFSET_I32:
+                    begin
+                      InputError('R_WASM_SECTION_OFFSET_I32 relocations not yet implemented');
+                      exit;
+                    end;
+                  R_WASM_GLOBAL_INDEX_LEB:
                     {TODO};
                     {TODO};
+                  R_WASM_TAG_INDEX_LEB:
+                    begin
+                      InputError('R_WASM_TAG_INDEX_LEB relocations not yet implemented');
+                      exit;
+                    end;
                   else
                   else
                     internalerror(2023122802);
                     internalerror(2023122802);
                 end;
                 end;