From 643f7afb0d7f63dcff873d3cbfd7ed3eaf94197f Mon Sep 17 00:00:00 2001 From: Andreas Krebbel Date: Mon, 27 Apr 2015 10:32:23 +0200 Subject: 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. --- binutils/ChangeLog | 6 ++++++ binutils/readelf.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) (limited to 'binutils') diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 44c56b5..18f4322 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,9 @@ +2015-04-27 Andreas Krebbel + + * readelf.c (display_s390_gnu_attribute): New function. + (process_s390_specific): New function. + (process_arch_specific): Call process_s390_specific. + 2015-04-24 Nick Clifton PR 18313 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: -- cgit v1.1