* elf32-ppc.c (ppc_elf_merge_obj_attributes): New.
	(ppc_elf_merge_private_bfd_data): Call it.

binutils:
	* readelf.c (display_power_gnu_attribute, process_power_specific):
	New.
	(process_arch_specific): Call process_power_specific.

include/elf:
	* ppc.h (Tag_GNU_Power_ABI_FP): Define.

ld/testsuite:
	* ld-powerpc/attr-gnu-4-0.s, ld-powerpc/attr-gnu-4-00.d,
	ld-powerpc/attr-gnu-4-01.d, ld-powerpc/attr-gnu-4-02.d,
	ld-powerpc/attr-gnu-4-1.s, ld-powerpc/attr-gnu-4-10.d,
	ld-powerpc/attr-gnu-4-11.d, ld-powerpc/attr-gnu-4-12.d,
	ld-powerpc/attr-gnu-4-13.d, ld-powerpc/attr-gnu-4-2.s,
	ld-powerpc/attr-gnu-4-20.d, ld-powerpc/attr-gnu-4-21.d,
	ld-powerpc/attr-gnu-4-22.d, ld-powerpc/attr-gnu-4-3.s,
	ld-powerpc/attr-gnu-4-31.d: New.
	* ld-powerpc/powerpc.exp: Run these new tests.
This commit is contained in:
Joseph Myers
2007-06-30 00:03:40 +00:00
parent 89ebe69733
commit 34c8bcbae2
23 changed files with 265 additions and 0 deletions

View File

@ -8346,6 +8346,57 @@ display_gnu_attribute (unsigned char *p,
return p;
}
static unsigned char *
display_power_gnu_attribute (unsigned char *p, int tag)
{
int type;
unsigned int len;
int val;
if (tag == Tag_GNU_Power_ABI_FP)
{
val = read_uleb128 (p, &len);
p += len;
printf (" Tag_GNU_Power_ABI_FP: ");
switch (val)
{
case 0:
printf ("Hard or soft float\n");
break;
case 1:
printf ("Hard float\n");
break;
case 2:
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 unsigned char *
display_mips_gnu_attribute (unsigned char *p, int tag)
{
@ -8539,6 +8590,13 @@ process_arm_specific (FILE *file)
display_arm_attribute, NULL);
}
static int
process_power_specific (FILE *file)
{
return process_attributes (file, NULL, SHT_GNU_ATTRIBUTES, NULL,
display_power_gnu_attribute);
}
static int
process_mips_specific (FILE *file)
{
@ -9317,6 +9375,9 @@ process_arch_specific (FILE *file)
case EM_MIPS_RS3_LE:
return process_mips_specific (file);
break;
case EM_PPC:
return process_power_specific (file);
break;
default:
break;
}