diff options
author | Jose E. Marchesi <jose.marchesi@oracle.com> | 2016-08-24 06:47:57 -0700 |
---|---|---|
committer | Jose E. Marchesi <jose.marchesi@oracle.com> | 2016-08-24 06:47:57 -0700 |
commit | b944b65f55869d47f986f035211e088ee0d2a7b7 (patch) | |
tree | 090301c51452c56a685dec092e78704e708af120 /tests | |
parent | b584da5ae7259d4923eb3f993de87cf55bef71b8 (diff) | |
download | elfutils-b944b65f55869d47f986f035211e088ee0d2a7b7.tar.gz |
sparc: fix the printing of hw capabilities object attributes.
The GNU_Sparc_HWCAPS and GNU_Sparc_HWCAPS2 object attributes comprise
a set of hardware capabilities that may (or not) be present in the
target machine for which the object was compiled. This patch adds the
support for printing a nicely formatted comma-separated list with the
selected hw capabilities.
Signed-off-by: Jose E. Marchesi <jose.marchesi@oracle.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ChangeLog | 5 | ||||
-rwxr-xr-x | tests/run-readelf-A.sh | 19 | ||||
-rw-r--r-- | tests/testfilesparc64attrs.o.bz2 | bin | 0 -> 242 bytes |
3 files changed, 23 insertions, 1 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog index f21a0b79..98a31ddd 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,8 @@ +2016-08-09 Jose E. Marchesi <jose.marchesi@oracle.com> + + * testfilesparc64attrs.o.bz2: New file. + * run-readelf-A.sh: Check attributes in a sparc object. + 2016-08-06 Mark Wielaard <mjw@redhat.com> * run-strip-reloc.sh: Add explicit compressed and uncompressed diff --git a/tests/run-readelf-A.sh b/tests/run-readelf-A.sh index 6ca9be89..03d511c9 100755 --- a/tests/run-readelf-A.sh +++ b/tests/run-readelf-A.sh @@ -1,5 +1,6 @@ #! /bin/sh # Copyright (C) 2014 Red Hat, Inc. +# Copyright (C) 2016 Oracle, Inc. # This file is part of elfutils. # # This file is free software; you can redistribute it and/or modify @@ -25,7 +26,13 @@ # # gcc -m32 -c testfileppc32attrs.s -testfiles testfilearm testfileppc32attrs.o +# = testfilesparc64attrs.s = +# .gnu_attribute 4,0x0aaaaaaa +# .gnu_attribute 8,0x00000055 +# +# gcc -c testfilesparc64attrs.s + +testfiles testfilearm testfileppc32attrs.o testfilesparc64attrs.o testrun_compare ${abs_top_builddir}/src/readelf -A testfilearm <<\EOF @@ -62,4 +69,14 @@ Object attributes section [ 4] '.gnu.attributes' of 18 bytes at offset 0x34: GNU_Power_ABI_Struct_Return: r3/r4 EOF +testrun_compare ${abs_top_builddir}/src/readelf -A testfilesparc64attrs.o <<\EOF + +Object attributes section [ 4] '.gnu.attributes' of 21 bytes at offset 0x40: + Owner Size + gnu 20 + File: 12 + GNU_Sparc_HWCAPS: div32,v8plus,vis,asi_blk_init,vis3,random,fjfmau,asi_cache_sparing,des,camellia,sha1,sha512,mont,cbcond + GNU_Sparc_HWCAPS2: fjathplus,adp,mwait,xmont +EOF + exit 0 diff --git a/tests/testfilesparc64attrs.o.bz2 b/tests/testfilesparc64attrs.o.bz2 Binary files differnew file mode 100644 index 00000000..7be7f88d --- /dev/null +++ b/tests/testfilesparc64attrs.o.bz2 |