summaryrefslogtreecommitdiffstats
path: root/tests/Makefile.am
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2015-01-20 21:55:55 +0100
committerMark Wielaard <mjw@redhat.com>2015-02-06 22:24:08 +0100
commitb543cdd95a0f9dfc33c862585f108a7a19728a10 (patch)
treebad303a9f37cd9ed491ccfb8f6239084eaf71f4b /tests/Makefile.am
parent058ae7b4d5bdfa0f39312b056ee9cadc4c3ffeb9 (diff)
downloadandroid_external_elfutils-b543cdd95a0f9dfc33c862585f108a7a19728a10.tar.gz
android_external_elfutils-b543cdd95a0f9dfc33c862585f108a7a19728a10.tar.bz2
android_external_elfutils-b543cdd95a0f9dfc33c862585f108a7a19728a10.zip
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>
Diffstat (limited to 'tests/Makefile.am')
-rw-r--r--tests/Makefile.am5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index c3364a2f..4420e8b5 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -51,7 +51,7 @@ check_PROGRAMS = arextract arsymtest newfile saridx scnnames sectiondump \
dwfl-report-elf-align varlocs backtrace backtrace-child \
backtrace-data backtrace-dwarf debuglink debugaltlink \
buildid deleted deleted-lib.so aggregate_size vdsosyms \
- getsrc_die strptr
+ getsrc_die strptr newdata
asm_TESTS = asm-tst1 asm-tst2 asm-tst3 asm-tst4 asm-tst5 \
asm-tst6 asm-tst7 asm-tst8 asm-tst9
@@ -113,7 +113,7 @@ TESTS = run-arextract.sh run-arsymtest.sh newfile test-nlist \
run-backtrace-demangle.sh run-stack-d-test.sh run-stack-i-test.sh \
run-readelf-dwz-multi.sh run-allfcts-multi.sh run-deleted.sh \
run-linkmap-cut.sh run-aggregate-size.sh vdsosyms run-readelf-A.sh \
- run-getsrc-die.sh run-strptr.sh
+ run-getsrc-die.sh run-strptr.sh newdata
if !BIARCH
export ELFUTILS_DISABLE_BIARCH = 1
@@ -426,6 +426,7 @@ aggregate_size_LDADD = $(libdw) $(libelf)
vdsosyms_LDADD = $(libdw) $(libelf)
getsrc_die_LDADD = $(libdw) $(libelf)
strptr_LDADD = $(libelf)
+newdata_LDADD = $(libelf)
if GCOV
check: check-am coverage