libelf: Always call ftruncate before posix_fallocate to set the right size.
When elf_update.c (write_file) doesn't know the current maximum file length
it might have to reduce the file size. posix_fallocate can only extend the
file. So always call ftruncate before that to set the file size and making
sure the backing store is fully there. Add test cases for checking strip
in place (eu-strip without -o) actually reduces the file size. But only
for non-ET_REL files. We might not be able to strip ET_REL files (except
when they are kernel modules) because they might contain "dangling" symbol
table entries.
https://bugzilla.redhat.com/show_bug.cgi?id=1232206
Signed-off-by: Mark Wielaard <mjw@redhat.com>
diff --git a/tests/ChangeLog b/tests/ChangeLog
index 19878ac..34f89cc 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,8 @@
+2015-06-16 Mark Wielaard <mjw@redhat.com>
+
+ * run-strip-test.sh: Add strip-in-place (eu-strip without -o) test
+ for non-ET_REL files.
+
2015-05-30 Mark Wielaard <mjw@redhat.com>
* backtrace-subr.sh (check_native_core): Notice core file couldn't be