diff options
author | Joseph Myers <joseph@codesourcery.com> | 2007-06-29 16:41:32 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2007-06-29 16:41:32 +0000 |
commit | 2cf19d5cb991a88bdc71d0852de8206d9510678f (patch) | |
tree | 56476355928c665ce8a498977e90d0bbdc0d3909 /binutils | |
parent | 104d59d19c416dcbf54fb387970b27178feb17d5 (diff) | |
download | gdb-2cf19d5cb991a88bdc71d0852de8206d9510678f.zip gdb-2cf19d5cb991a88bdc71d0852de8206d9510678f.tar.gz gdb-2cf19d5cb991a88bdc71d0852de8206d9510678f.tar.bz2 |
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.
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/ChangeLog | 5 | ||||
-rw-r--r-- | binutils/readelf.c | 57 |
2 files changed, 62 insertions, 0 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 2dfb51e..76e0b68 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,5 +1,10 @@ 2007-06-29 Joseph Myers <joseph@codesourcery.com> + * readelf.c (display_mips_gnu_attribute): New. + (process_mips_specific): Call process_attributes. + +2007-06-29 Joseph Myers <joseph@codesourcery.com> + * readelf.c (display_gnu_attribute): New. (process_arm_specific): Rearrange as process_attributes. (process_arm_specific): Replace by wrapper of process_attributes. diff --git a/binutils/readelf.c b/binutils/readelf.c index 1c4c715..c20fcd6 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -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. */ |