This is https://bugs.llvm.org/show_bug.cgi?id=40861,
Previously llvm-readobj would print the DT_NULL sometimes for the dynamic section that
has no terminator entry. The logic of printDynamicTable was a bit overcomplicated
fo my eye, I rewrote it slightly and commented.
I'd rephrase this and the last sentence somewhat, as it's not clear at first what you mean:
"However, sometimes the section content may continue past the DT_NULL entry, so to dump the section correctly, we first find the end of the entries by iterating over them."