diff --git a/build/unix/elfhack/elfhack.cpp b/build/unix/elfhack/elfhack.cpp index 3116687fc830..7a5fceecc044 100644 --- a/build/unix/elfhack/elfhack.cpp +++ b/build/unix/elfhack/elfhack.cpp @@ -177,6 +177,7 @@ class ElfRelHackCode_Section : public ElfSection { // alignment required by code sections. if (shdr.sh_addralign < (*c)->getAddrAlign()) shdr.sh_addralign = (*c)->getAddrAlign(); + last = *c; } shdr.sh_size = code.back()->getAddr() + code.back()->getSize(); data = static_cast(malloc(shdr.sh_size));