This helps to keep client code cleaner.
For example we have next code in LLD:
auto *Begin = reinterpret_cast<const Elf_Dyn *>(Obj.base() + DynamicSec->sh_offset); const Elf_Dyn *End = Begin + DynamicSec->sh_size / sizeof(Elf_Dyn);
sh_offset and/or sh_size may be broken here and the same situation can be found for some other sections.
Instead of placing multiple checks in LLD, I suggest this change to check object once during loading.