diff options
author | Andy Wingo <wingo@igalia.com> | 2020-10-01 17:30:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-01 08:30:58 -0700 |
commit | ee87440dedb4335d5ca8ec25e86b36c27a5b3368 (patch) | |
tree | 522ec9766d5da42fd8b8ba6efa0c6e74fc370748 /src/binary-reader-logging.cc | |
parent | cd63243c5b3b2fa938f365edab30139f74549b51 (diff) | |
download | wabt-ee87440dedb4335d5ca8ec25e86b36c27a5b3368.tar.gz wabt-ee87440dedb4335d5ca8ec25e86b36c27a5b3368.tar.bz2 wabt-ee87440dedb4335d5ca8ec25e86b36c27a5b3368.zip |
Add --relocatable support for tables (#1549) (#1549)
We add relocations for table numbers on each place where we reify a
table number (call_indirect, table.get, table.set...), but only if
reference types are enabled.
Also, fix symbol table generation with unnamed definitions, to allow for
relocating references to anonymous functions or tables.
As tests, add variants of the relocations and symbol-tables dump tests,
with and without all features enabled. Enabling reference types causes
relocs to be emitted. We also add --details to the relocations dump
tests, so that we can see the target symbols for the relocations.
Diffstat (limited to 'src/binary-reader-logging.cc')
-rw-r--r-- | src/binary-reader-logging.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/binary-reader-logging.cc b/src/binary-reader-logging.cc index b74dcf43..9c83a049 100644 --- a/src/binary-reader-logging.cc +++ b/src/binary-reader-logging.cc @@ -603,6 +603,16 @@ Result BinaryReaderLogging::OnEventSymbol(Index index, return reader_->OnEventSymbol(index, flags, name, event_index); } +Result BinaryReaderLogging::OnTableSymbol(Index index, + uint32_t flags, + string_view name, + Index table_index) { + LOGF("OnTableSymbol(name: " PRIstringview " flags: 0x%x index: %" PRIindex + ")\n", + WABT_PRINTF_STRING_VIEW_ARG(name), flags, table_index); + return reader_->OnTableSymbol(index, flags, name, table_index); +} + Result BinaryReaderLogging::OnSegmentInfo(Index index, string_view name, Address alignment, |