Skip to content
Commit 9e2013fe authored by Juliana Oliveira Rodrigues's avatar Juliana Oliveira Rodrigues
Browse files

tests: test_elf: fixed readelf exit code 1



Due to a recent code change in readelf, when no section was found,
readelf returned code 1 instead of the previous code 0. This behaviour
change caused diffoscope to not append details whenever a section wasn't
found, including in our own tests.

The modification was made in version 2.29 of binutils and – although was
quickly fixed in version 2.29.1 – leaves a version hole where diffoscope
might not work as expected without further information.

This patch adds a version checker for readelf where a few tests are
ignored if someone happens to be using binutils 2.29.

For more information on the change:
binutils/readelf.c:get_section_contents

Fixes #877728

Signed-off-by: default avatarJuliana Oliveira Rodrigues <juliana.orod@gmail.com>
parent 85998730
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment