HomeFreeBSD

elfcopy: Clear errors after fetching the shstrtab index.

Description

elfcopy: Clear errors after fetching the shstrtab index.

Otherwise a future call to elf_errno() will return a non-zero value.
update_shdr(), for example, treats any errors associated with the ELF
descriptor as fatal. Clear the error per the first example in
elf_errmsg.3.

Convert to elf_getshdrstrndx() while here since elf_getshstrndx() is
apparently deprecated.

Reported by: royger
Reviewed by: emaste
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D20852

Details

Provenance
markjAuthored on
Reviewer
emaste
Differential Revision
D20852: elfcopy: Clear errors after fetching the shstrtab index.
Parents
rS349729: Consider *clean targets as non-build targets as well.
Branches
Unknown
Tags
Unknown