summaryrefslogtreecommitdiff
path: root/src/modelops/toFile.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/modelops/toFile.c')
-rw-r--r--src/modelops/toFile.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/modelops/toFile.c b/src/modelops/toFile.c
index 66109df..434130e 100644
--- a/src/modelops/toFile.c
+++ b/src/modelops/toFile.c
@@ -11,6 +11,7 @@ static void flattenSymtab(ElfuElf *me)
elfu_mLayoutAuto(me);
+ /* Update section indexes and count symbols */
CIRCLEQ_FOREACH(sym, &me->symtab->symtab.syms, elem) {
if (sym->scnptr) {
sym->shndx = elfu_mScnIndex(me, sym->scnptr);
@@ -19,6 +20,7 @@ static void flattenSymtab(ElfuElf *me)
numsyms++;
}
+ /* Copy symbols to elfclass-specific format */
if (me->elfclass == ELFCLASS32) {
size_t newsize = (numsyms + 1) * sizeof(Elf32_Sym);
size_t i;