seems like i misread some of the ELF specs. Your fix is right (sorry for the noise). BTW, you could also remove the use of STN_UNDEF in elf.c while you're at it.
Not to worry, I am now more confused than ever :-). By the way, what is STN_UNDEF for ?
Changelog: Use SHN_UNDEF instead of STN_UNDEF to specify undefined section index.
Kind regards,