summaryrefslogtreecommitdiff
path: root/src/binary-reader-linker.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/binary-reader-linker.cc')
-rw-r--r--src/binary-reader-linker.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/binary-reader-linker.cc b/src/binary-reader-linker.cc
index 5d652951..dc537259 100644
--- a/src/binary-reader-linker.cc
+++ b/src/binary-reader-linker.cc
@@ -52,7 +52,11 @@ static Result on_reloc_count(uint32_t count,
return Result::Error;
}
-static Result on_reloc(RelocType type, uint32_t offset, void* user_data) {
+static Result on_reloc(RelocType type,
+ uint32_t offset,
+ uint32_t index,
+ int32_t addend,
+ void* user_data) {
Context* ctx = static_cast<Context*>(user_data);
if (offset + RELOC_SIZE > ctx->reloc_section->size) {
@@ -62,6 +66,8 @@ static Result on_reloc(RelocType type, uint32_t offset, void* user_data) {
Reloc* reloc = append_reloc(&ctx->reloc_section->relocations);
reloc->type = type;
reloc->offset = offset;
+ reloc->index = index;
+ reloc->addend = addend;
return Result::Ok;
}