Check for DynSecSize % sizeof(Elf_Dyn) != 0 is unneeded in this context.
- If the .dynamic section is acquired from program headers, the .dynamic
section is "cut off" by
makeArrayRef(..., Phdr.p_filesz / sizeof(Elf_Dyn)); DynSeSize = Phdr.p_filesz;
- If the .dynamic section is acquired from section headers, the .dynamic
section is checked in getSectionContentsAsArray<Elf_Dyn>(&Sec).
This is not being read anymore. So it's causing these warnings:
variable ‘DynSecSize’ set but not used [-Werror=unused-but-set-variable].