summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Fortune <matthew.fortune@imgtec.com>2014-10-17 11:07:17 +0100
committerMatthew Fortune <matthew.fortune@imgtec.com>2014-10-28 12:54:08 +0000
commitb5736530ad5d8aec4c1b5a93be47260699afdf82 (patch)
treecd43b83dfadccc7898bb580f0dd5c05d2bbb8b44
parentb2f93c5011cab00f31669363577b938697752e43 (diff)
downloadbinutils-b5736530ad5d8aec4c1b5a93be47260699afdf82.tar.gz
binutils-b5736530ad5d8aec4c1b5a93be47260699afdf82.tar.bz2
binutils-b5736530ad5d8aec4c1b5a93be47260699afdf82.zip
Show information about unknown ASEs and extensions in .MIPS.abiflags
Import from trunk. bfd/ * elfxx-mips.c (print_mips_ases): Print unknown ASEs. (print_mips_isa_ext): Print the value of an unknown extension. binutils/ * readelf.c (print_mips_ases): Print unknown ASEs. (print_mips_isa_ext): Print the value of an unknown extension. include/ * elf/mips.h (AFL_ASE_MASK): Define.
-rw-r--r--bfd/ChangeLog7
-rw-r--r--bfd/elfxx-mips.c4
-rw-r--r--binutils/ChangeLog7
-rw-r--r--binutils/readelf.c4
-rw-r--r--include/ChangeLog6
-rw-r--r--include/elf/mips.h1
6 files changed, 27 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 19b8bb4badd..f7e58ff760c 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,10 @@
+2014-10-28 Matthew Fortune <matthew.fortune@imgtec.com>
+
+ Apply trunk patches
+ 2014-10-22 Matthew Fortune <matthew.fortune@imgtec.com>
+ * elfxx-mips.c (print_mips_ases): Print unknown ASEs.
+ (print_mips_isa_ext): Print the value of an unknown extension.
+
2014-10-28 Nick Clifton <nickc@redhat.com>
* Apply trunk patches:
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index a1e9945c79f..61c363a9460 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -15507,6 +15507,8 @@ print_mips_ases (FILE *file, unsigned int mask)
fputs ("\n\tXPA ASE", file);
if (mask == 0)
fprintf (file, "\n\t%s", _("None"));
+ else if ((mask & ~AFL_ASE_MASK) != 0)
+ fprintf (stdout, "\n\t%s (%x)", _("Unknown"), mask & ~AFL_ASE_MASK);
}
static void
@@ -15572,7 +15574,7 @@ print_mips_isa_ext (FILE *file, unsigned int isa_ext)
fputs ("ST Microelectronics Loongson 2F", file);
break;
default:
- fputs (_("Unknown"), file);
+ fprintf (file, "%s (%d)", _("Unknown"), isa_ext);
break;
}
}
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index eca640021c3..137f56cc447 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,10 @@
+2014-10-28 Matthew Fortune <matthew.fortune@imgtec.com>
+
+ Apply trunk patches
+ 2014-10-22 Matthew Fortune <matthew.fortune@imgtec.com>
+ * readelf.c (print_mips_ases): Print unknown ASEs.
+ (print_mips_isa_ext): Print the value of an unknown extension.
+
2014-10-15 Tristan Gingold <gingold@adacore.com>
* configure: Regenerate.
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 58ccd939297..bc79f036f5a 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -12723,6 +12723,8 @@ print_mips_ases (unsigned int mask)
fputs ("\n\tXPA ASE", stdout);
if (mask == 0)
fprintf (stdout, "\n\t%s", _("None"));
+ else if ((mask & ~AFL_ASE_MASK) != 0)
+ fprintf (stdout, "\n\t%s (%x)", _("Unknown"), mask & ~AFL_ASE_MASK);
}
static void
@@ -12788,7 +12790,7 @@ print_mips_isa_ext (unsigned int isa_ext)
fputs ("ST Microelectronics Loongson 2F", stdout);
break;
default:
- fputs (_("Unknown"), stdout);
+ fprintf (stdout, "%s (%d)", _("Unknown"), isa_ext);
}
}
diff --git a/include/ChangeLog b/include/ChangeLog
index 7acd73dbdcb..35defada470 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,9 @@
+2014-10-28 Matthew Fortune <matthew.fortune@imgtec.com>
+
+ Apply trunk patches
+ 2014-10-22 Matthew Fortune <matthew.fortune@imgtec.com>
+ * elf/mips.h (AFL_ASE_MASK): Define.
+
2014-09-26 Max Ostapenko <m.ostapenko@partner.samsung.com>
* libiberty.h (PEX_STDOUT_APPEND): New flag.
diff --git a/include/elf/mips.h b/include/elf/mips.h
index 1fa69c15c31..2ed6acd288d 100644
--- a/include/elf/mips.h
+++ b/include/elf/mips.h
@@ -1224,6 +1224,7 @@ extern void bfd_mips_elf_swap_abiflags_v0_out
#define AFL_ASE_MIPS16 0x00000400 /* MIPS16 ASE. */
#define AFL_ASE_MICROMIPS 0x00000800 /* MICROMIPS ASE. */
#define AFL_ASE_XPA 0x00001000 /* XPA ASE. */
+#define AFL_ASE_MASK 0x00001fff /* All ASEs. */
/* Values for the isa_ext word of an ABI flags structure. */