aboutsummaryrefslogtreecommitdiff
path: root/binutils/readelf.c
diff options
context:
space:
mode:
authorAndreas Krebbel <krebbel@linux.vnet.ibm.com>2015-04-27 10:32:23 +0200
committerAndreas Krebbel <krebbel@linux.vnet.ibm.com>2015-04-27 10:32:23 +0200
commit643f7afb0d7f63dcff873d3cbfd7ed3eaf94197f (patch)
tree4bff220a5e5372b4ab9ee2a33d6bf761dbf3248c /binutils/readelf.c
parent3b78cfe1033fafa6ca36c69cf8587c1bd96996ca (diff)
downloadgdb-643f7afb0d7f63dcff873d3cbfd7ed3eaf94197f.zip
gdb-643f7afb0d7f63dcff873d3cbfd7ed3eaf94197f.tar.gz
gdb-643f7afb0d7f63dcff873d3cbfd7ed3eaf94197f.tar.bz2
S/390: z13 use GNU attribute to indicate vector ABI
bfd/ * elf-s390-common.c (elf_s390_merge_obj_attributes): New function. * elf32-s390.c (elf32_s390_merge_private_bfd_data): Call elf_s390_merge_obj_attributes. * elf64-s390.c (elf64_s390_merge_private_bfd_data): New function. binutils/ * readelf.c (display_s390_gnu_attribute): New function. (process_s390_specific): New function. (process_arch_specific): Call process_s390_specific. gas/ * doc/as.texinfo: Document Tag_GNU_S390_ABI_Vector. include/elf/ * s390.h: Define Tag_GNU_S390_ABI_Vector.
Diffstat (limited to 'binutils/readelf.c')
-rw-r--r--binutils/readelf.c46
1 files changed, 46 insertions, 0 deletions
diff --git a/binutils/readelf.c b/binutils/readelf.c
index dfa5c0b..724df24 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -12845,6 +12845,41 @@ display_power_gnu_attribute (unsigned char * p,
return display_tag_value (tag & 1, p, end);
}
+static unsigned char *
+display_s390_gnu_attribute (unsigned char * p,
+ int tag,
+ const unsigned char * const end)
+{
+ unsigned int len;
+ int val;
+
+ if (tag == Tag_GNU_S390_ABI_Vector)
+ {
+ val = read_uleb128 (p, &len, end);
+ p += len;
+ printf (" Tag_GNU_S390_ABI_Vector: ");
+
+ switch (val)
+ {
+ case 0:
+ printf (_("any\n"));
+ break;
+ case 1:
+ printf (_("software\n"));
+ break;
+ case 2:
+ printf (_("hardware\n"));
+ break;
+ default:
+ printf ("??? (%d)\n", val);
+ break;
+ }
+ return p;
+ }
+
+ return display_tag_value (tag & 1, p, end);
+}
+
static void
display_sparc_hwcaps (int mask)
{
@@ -13616,6 +13651,13 @@ process_power_specific (FILE * file)
}
static int
+process_s390_specific (FILE * file)
+{
+ return process_attributes (file, NULL, SHT_GNU_ATTRIBUTES, NULL,
+ display_s390_gnu_attribute);
+}
+
+static int
process_sparc_specific (FILE * file)
{
return process_attributes (file, NULL, SHT_GNU_ATTRIBUTES, NULL,
@@ -15609,6 +15651,10 @@ process_arch_specific (FILE * file)
case EM_PPC:
return process_power_specific (file);
break;
+ case EM_S390:
+ case EM_S390_OLD:
+ return process_s390_specific (file);
+ break;
case EM_SPARC:
case EM_SPARC32PLUS:
case EM_SPARCV9: