MFC r210324, r210438.
r210324:
- Correctly handle sections of type SHT_NOBITS. For these sections:
- elf_getdata() and elf_rawdata() should return an "Elf_Data" structure
that has its "d_buf" member set to NULL and "d_size" member set to
the nominal 'size' of the section.
- Update the manual page for these functions.
- Fix a memory leak in an error handling path inside elf_getdata().
- Use _libelf_allocate_data() in elf_newdata() for consistency.
r210438: (np)
Catch up with r210324. d_buf will be NULL for SHT_NOBITS sections, do not
attempt to copy from it in that case.
git-svn-id: svn://svn.freebsd.org/base/stable/8@212198
ccf9f872-aa2e-dd11-9fc8-
001c23d0bc1f