PPC: passing correct const pool offset for reloc

Change-Id: I17ab5dbf79acbba1c562ecaf585e919da6cfaf75
Reviewed-on: https://chromium-review.googlesource.com/c/1412632
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#58851}
This commit is contained in:
Junliang Yan 2019-01-15 11:16:05 -05:00 committed by Commit Bot
parent f2303d9a34
commit 4f261e9a59

View File

@ -370,7 +370,7 @@ void NativeModuleSerializer::WriteCode(const WasmCode* code, Writer* writer) {
code->constant_pool(), mask);
for (RelocIterator iter(
{code_start, code->instructions().size()}, code->reloc_info(),
reinterpret_cast<Address>(code_start) + code->unpadded_binary_size(),
reinterpret_cast<Address>(code_start) + code->constant_pool_offset(),
mask);
!iter.done(); iter.next(), orig_iter.next()) {
RelocInfo::Mode mode = orig_iter.rinfo()->rmode();