After modifying test_build_id_debuglink, mips-linux fails
objcopy --only-keep-debug tmpdir/testprog tmpdir/testprog.debug
with the above error. This is due to .MIPS.abiflags and .reginfo
being made SHT_NOBITS but the .note.gnu.build-id which follows is
SHT_PROGBITS. That tickles a bug in file offset tracking.
* elf.c (assign_file_positions_for_load_sections): When
resetting "off_adjust" for sections with contents following
sections without contents, put back "off" too.
{
if (this_hdr->sh_type != SHT_NOBITS)
{
+ off -= off_adjust;
off_adjust = 0;
if (p->p_filesz + adjust < p->p_memsz)
{