This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[patch] Fix readelf to print versions for non-default symbol versions
- From: ccoutant at gmail dot com
- To: binutils at sourceware dot org
- Date: Sat, 21 Apr 2018 21:26:57 -0700
- Subject: [patch] Fix readelf to print versions for non-default symbol versions
This patch masks out the VERSYM_HIDDEN bit when looking for a
version name in the verneed section (to match similar code just
a bit below).
OK for master?
-cary
2018-04-21 Cary Coutant <ccoutant@gmail.com>
binutils/
* readelf.c (process_version_sections): Mask out VERSYM_HIDDEN bit.
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 528954cc6e..b24abd5260 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -10692,10 +10692,10 @@ process_version_sections (Filedata * filedata)
a_off += ivna.vna_next;
}
- while (ivna.vna_other != data[cnt + j]
+ while (ivna.vna_other != (data[cnt + j] & VERSYM_VERSION)
&& ivna.vna_next != 0);
- if (ivna.vna_other == data[cnt + j])
+ if (ivna.vna_other == (data[cnt + j] & VERSYM_VERSION))
{
ivna.vna_name = BYTE_GET (evna.vna_name);