summaryrefslogtreecommitdiffstats
path: root/tests/newdata.c
Commit message (Collapse)AuthorAgeFilesLines
* Open files in O_BINARYUlf Hermann2017-05-081-4/+4
| | | | | | | | | If O_BINARY is not defined, define it to 0, so that the change has no effect then. Some systems have separate binary and text modes for files, and we don't want the text mode to be used. Change-Id: If7efb5bd448c2a1c7d1eb5dab276849b1b15a3ce Reviewed-by: Christian Kandeler <[email protected]>
* tests: Use PRId64 for printing loff_t.Mark Wielaard2015-02-191-3/+4
| | | | | | loff_t is always 64bits. Signed-off-by: Mark Wielaard <[email protected]>
* libelf: Fix elf_newdata when raw ELF file/image data is available.Mark Wielaard2015-02-061-0/+402
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 <[email protected]>