forked from Imagelibrary/binutils-gdb
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.
This commit is contained in:
@@ -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)
|
||||
{
|
||||
@@ -13615,6 +13650,13 @@ process_power_specific (FILE * file)
|
||||
display_power_gnu_attribute);
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user