diff options
author | Joseph Myers <joseph@codesourcery.com> | 2017-10-05 14:19:39 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2017-10-05 14:19:39 +0000 |
commit | 97953bab05cca82bd3119de4d5cf26103b649597 (patch) | |
tree | adde5227a711aacab47d2ffc9b54432450ed61e5 /binutils | |
parent | 64f7152491727daf8d0b294aa5ddf49f08c63ca2 (diff) | |
download | gdb-97953bab05cca82bd3119de4d5cf26103b649597.zip gdb-97953bab05cca82bd3119de4d5cf26103b649597.tar.gz gdb-97953bab05cca82bd3119de4d5cf26103b649597.tar.bz2 |
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.
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/ChangeLog | 4 | ||||
-rw-r--r-- | binutils/readelf.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 4daa60e..4fb4eb4 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,7 @@ +2017-10-05 Joseph Myers <joseph@codesourcery.com> + + * readelf.c (decode_arm_unwind): Initialize res to TRUE. + 2017-10-05 Nick Clifton <nickc@redhat.com> PR 22260 diff --git a/binutils/readelf.c b/binutils/readelf.c index 3cdde6c..22d60e9 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -8731,7 +8731,7 @@ decode_arm_unwind (struct arm_unw_aux_info * aux, unsigned int more_words = 0; struct absaddr addr; bfd_vma sym_name = (bfd_vma) -1; - bfd_boolean res = FALSE; + bfd_boolean res = TRUE; if (remaining == 0) { |