]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - binutils/readelf.c
Avoid spurious readelf error status from decode_arm_unwind.
authorJoseph Myers <joseph@codesourcery.com>
Thu, 5 Oct 2017 14:19:39 +0000 (14:19 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Thu, 5 Oct 2017 14:19:39 +0000 (14:19 +0000)
commit97953bab05cca82bd3119de4d5cf26103b649597
treeadde5227a711aacab47d2ffc9b54432450ed61e5
parent64f7152491727daf8d0b294aa5ddf49f08c63ca2
Avoid spurious readelf error status from decode_arm_unwind.

readelf.c:decode_arm_unwind has a variable res that is used as a
return value, with FALSE meaning unsuccessful and TRUE meaning
successful.  This is initialized to FALSE (and then various code in
the function sets it to FALSE again on error), meaning that when the
function is successful, if it reaches returning res is still returns
FALSE, resulting eventually in exit status 1 from readelf without any
error message to indicate an error.

This patch fixes the initialization to use TRUE, so avoiding those
spurious errors.  I don't have a self-contained test for this issue;
it was observed as many prelink tests failing without the patch and
passing with it.

* readelf.c (decode_arm_unwind): Initialize res to TRUE.
binutils/ChangeLog
binutils/readelf.c