bfd:
* elfxx-mips.c (mips_elf_merge_obj_attributes): New. (_bfd_mips_elf_merge_private_bfd_data): Call it. binutils: * readelf.c (display_mips_gnu_attribute): New. (process_mips_specific): Call process_attributes. include/elf: * mips.h (Tag_GNU_MIPS_ABI_FP): Define. ld/testsuite: * ld-mips-elf/attr-gnu-4-0.s, ld-mips-elf/attr-gnu-4-00.d, ld-mips-elf/attr-gnu-4-01.d, ld-mips-elf/attr-gnu-4-02.d, ld-mips-elf/attr-gnu-4-03.d, ld-mips-elf/attr-gnu-4-1.s, ld-mips-elf/attr-gnu-4-10.d, ld-mips-elf/attr-gnu-4-11.d, ld-mips-elf/attr-gnu-4-12.d, ld-mips-elf/attr-gnu-4-13.d, ld-mips-elf/attr-gnu-4-14.d, ld-mips-elf/attr-gnu-4-2.s, ld-mips-elf/attr-gnu-4-20.d, ld-mips-elf/attr-gnu-4-21.d, ld-mips-elf/attr-gnu-4-22.d, ld-mips-elf/attr-gnu-4-23.d, ld-mips-elf/attr-gnu-4-3.s, ld-mips-elf/attr-gnu-4-30.d, ld-mips-elf/attr-gnu-4-31.d, ld-mips-elf/attr-gnu-4-32.d, ld-mips-elf/attr-gnu-4-33.d, ld-mips-elf/attr-gnu-4-4.s, ld-mips-elf/attr-gnu-4-41.d: New. * ld-mips-elf/mips-elf.exp: Run these new tests.
This commit is contained in:
parent
104d59d19c
commit
2cf19d5cb9
31 changed files with 376 additions and 0 deletions
|
@ -8346,6 +8346,60 @@ display_gnu_attribute (unsigned char *p,
|
|||
return p;
|
||||
}
|
||||
|
||||
static unsigned char *
|
||||
display_mips_gnu_attribute (unsigned char *p, int tag)
|
||||
{
|
||||
int type;
|
||||
unsigned int len;
|
||||
int val;
|
||||
|
||||
if (tag == Tag_GNU_MIPS_ABI_FP)
|
||||
{
|
||||
val = read_uleb128 (p, &len);
|
||||
p += len;
|
||||
printf (" Tag_GNU_MIPS_ABI_FP: ");
|
||||
switch (val)
|
||||
{
|
||||
case 0:
|
||||
printf ("Hard or soft float\n");
|
||||
break;
|
||||
case 1:
|
||||
printf ("Hard float (-mdouble-float)\n");
|
||||
break;
|
||||
case 2:
|
||||
printf ("Hard float (-msingle-float)\n");
|
||||
break;
|
||||
case 3:
|
||||
printf ("Soft float\n");
|
||||
break;
|
||||
default:
|
||||
printf ("??? (%d)\n", val);
|
||||
break;
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
if (tag & 1)
|
||||
type = 1; /* String. */
|
||||
else
|
||||
type = 2; /* uleb128. */
|
||||
printf (" Tag_unknown_%d: ", tag);
|
||||
|
||||
if (type == 1)
|
||||
{
|
||||
printf ("\"%s\"\n", p);
|
||||
p += strlen ((char *)p) + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
val = read_uleb128 (p, &len);
|
||||
p += len;
|
||||
printf ("%d (0x%x)\n", val, val);
|
||||
}
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
static int
|
||||
process_attributes (FILE *file, const char *public_name,
|
||||
unsigned int proc_type,
|
||||
|
@ -8495,6 +8549,9 @@ process_mips_specific (FILE *file)
|
|||
size_t options_offset = 0;
|
||||
size_t conflicts_offset = 0;
|
||||
|
||||
process_attributes (file, NULL, SHT_GNU_ATTRIBUTES, NULL,
|
||||
display_mips_gnu_attribute);
|
||||
|
||||
/* We have a lot of special sections. Thanks SGI! */
|
||||
if (dynamic_section == NULL)
|
||||
/* No information available. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue