[PATCH] D46765: [WebAssembly] Fix R_WEBASSEMBLY_FUNCTION_OFFSET_I32 relocation entries

Yury Delendik via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 14 11:33:35 PDT 2018


yurydelendik added inline comments.


================
Comment at: wasm/InputFiles.cpp:48
-  unsigned Count;
-  llvm::decodeULEB128(FunctionBody.data(), &Count);
-  return Count;
----------------
sbc100 wrote:
> Where is the actual bug? This code looks like its doing the right thing, no?
Actual bug is: `Function->getFunctionBody()` returns only operators data (without function size and params/locals), but I assumed it will be an entire function data (inculding function size).

The actual intent was to know function code offset (+params/locals) to properly perform calcNewValue and calcExpectedValue




Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D46765





More information about the llvm-commits mailing list