History log of /external/elfutils/tests/newdata.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
2e09635f3e9245e4ea0a827dbe7e881c56328507 19-Feb-2015 Mark Wielaard <mjw@redhat.com> tests: Use PRId64 for printing loff_t.

loff_t is always 64bits.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
/external/elfutils/tests/newdata.c
b543cdd95a0f9dfc33c862585f108a7a19728a10 20-Jan-2015 Mark Wielaard <mjw@redhat.com> libelf: Fix elf_newdata when raw ELF file/image data is available.

When ELF data for a section has been read by elf_rawdata, data_read
and rawdata_base are set, but data_list_rear will not be set until the
data will be converted (by elf_getdata). elf_newdata would overwrite
the existing data in that case. Both elf_getdata and elf_update rely
on the fact that when data_list_rear is set they don't have to look
at the raw data anymore. So make sure we update the data list properly
before adding any new data and raw data is available in elf_newdata.

Add newdata test that calls elf_newdata before and after elf_rawdata
and elf_getdata and checks the new size and contents of the section.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
/external/elfutils/tests/newdata.c