diff options
author | Mark Wielaard <mark@klomp.org> | 2018-11-11 23:50:41 +0100 |
---|---|---|
committer | Mark Wielaard <mark@klomp.org> | 2018-11-13 13:40:00 +0100 |
commit | 7a3f6fe60b8519b5372f5a5521ccbac59411f33f (patch) | |
tree | 48f21c4114d440e49483699a2dda27198b2f76d4 /tests/run-readelf-n.sh | |
parent | cff53f1784c9a4344604bedf41b7d499b3eb30d5 (diff) |
Recognize NT_VERSION notes.
NT_VERSION notes are emitted by the gas .version directive.
They have an empty description and (ab)use the owner name to store the
version data string.
Signed-off-by: Mark Wielaard <mark@klomp.org>
Diffstat (limited to 'tests/run-readelf-n.sh')
-rwxr-xr-x | tests/run-readelf-n.sh | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/tests/run-readelf-n.sh b/tests/run-readelf-n.sh index 3ae7cf02..7e2a845e 100755 --- a/tests/run-readelf-n.sh +++ b/tests/run-readelf-n.sh @@ -48,8 +48,25 @@ Note segment of 32 bytes at offset 0x300: Note segment of 68 bytes at offset 0x320: Owner Data size Type - GNU 16 VERSION + GNU 16 GNU_ABI_TAG OS: Linux, ABI: 3.2.0 GNU 20 GNU_BUILD_ID Build ID: 83cb2229fabd2065d1361f5b46424cd75270f94b EOF + +# NT_VERSION note type clashes with "GNU" owner type NT_GNU_ABI_TAG. +# Uses owner name (with zero desc) for version string. +testfiles testfile11 +testrun_compare ${abs_top_builddir}/src/readelf -n testfile11 << EOF + +Note section [ 2] '.note.ABI-tag' of 32 bytes at offset 0x128: + Owner Data size Type + GNU 16 GNU_ABI_TAG + OS: Linux, ABI: 2.2.5 + +Note section [35] '.note' of 60 bytes at offset 0x13364: + Owner Data size Type + 01.01 0 VERSION + 01.01 0 VERSION + 01.01 0 VERSION +EOF |