Skip to content

Commit 7e6c4c3

Browse files
PistonMinerZephiles
authored andcommitted
elf2rel: Fix the addend being ignored on relocations against external symbols
1 parent b58ee25 commit 7e6c4c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ttyd-tools/elf2rel/elf2rel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ int main(int argc, char **argv)
371371

372372
rel.moduleID = 0;
373373
rel.targetSection = 0; // #todo-elf2rel: Check if this is important
374-
rel.addend = it->second;
374+
rel.addend = static_cast<uint32_t>(addend + it->second);
375375
}
376376
}
377377

0 commit comments

Comments
 (0)