This patch addresses comments in D81450
I'd go a bit stricter way here:
You can use llvm-readelf --sections and check the whole section header:
There are 3 section headers, starting at offset 0x58: Section Headers: [Nr] Name [ 0] [ 1] .strtab [ 2] .shstrtab
I'm not a massive fan of just relying on --implicit-check-not in a test, as it risks a spelling error or similar strange change. In this case, it's probably fine, but perhaps a suggestion is to also check the number of section headers is as expected (i.e. 3 - null shdr, .strtab and .shstrtab). You can do that using llvm-readelf instead of llvm-readobj, as that includes the number of section headers before the table itself.