[lld] [lld][WebAssembly] Add missing relocation types to the --compress-relocations path (PR #144578)

Sam Clegg via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 18 11:39:16 PDT 2025


================
@@ -239,11 +239,18 @@ static unsigned writeCompressedReloc(uint8_t *buf, const WasmRelocation &rel,
     return encodeULEB128(value, buf);
   case R_WASM_TABLE_INDEX_SLEB:
   case R_WASM_TABLE_INDEX_SLEB64:
+  case R_WASM_TABLE_INDEX_REL_SLEB64:
   case R_WASM_MEMORY_ADDR_SLEB:
   case R_WASM_MEMORY_ADDR_SLEB64:
+  case R_WASM_MEMORY_ADDR_REL_SLEB:
+  case R_WASM_MEMORY_ADDR_REL_SLEB64:
+  case R_WASM_MEMORY_ADDR_TLS_SLEB:
+  case R_WASM_MEMORY_ADDR_TLS_SLEB64:
+  case R_WASM_TABLE_INDEX_REL_SLEB:
     return encodeSLEB128(static_cast<int64_t>(value), buf);
   default:
----------------
sbc100 wrote:

Can we remove this default case so that in future new relocations need to be added here right away?

https://github.com/llvm/llvm-project/pull/144578


More information about the llvm-commits mailing list