This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH users/roland/osabi] Recognize GNU .note.ABI-tag values 5 (syllable) and 6 (nacl)


These two values are assigned in glibc trunk (5 has been assigned to
syllable for several years, and 6 is quite recent).  I don't actually know
anything about Syllable, but IMHO it makes sense for the other GNU packages
that think about these values at all (binutils/gdb) to grok all the values
that exist in the GNU package that owns this number space (libc).

OK for trunk and gdb's 7.9 branch?  (I don't really care about the readelf
change, but I'm happy to put it on binutils' 2.25 branch if anyone thinks
it's worthwhile.)


Thanks,
Roland


binutils/
	* readelf.c (print_gnu_note: NT_GNU_ABI_TAG): Recognize
	GNU_ABI_TAG_SYLLABLE and GNU_ABI_TAG_NACL.

gdb/
	* defs.h (enum gdb_osabi): Add GDB_OSABI_SYLLABLE and GDB_OSABI_NACL.
	* osabi.c (generic_elf_osabi_sniff_abi_tag_sections): Recognize
	GNU_ABI_TAG_SYLLABLE and GNU_ABI_TAG_NACL.
	* configure.tgt (*-*-nacl*): Set gdb_osabi=GDB_OSABI_NACL.

include/elf/
	* common.h (GNU_ABI_TAG_SYLLABLE): New macro.
	(GNU_ABI_TAG_NACL): New macro.

diff --git a/binutils/readelf.c b/binutils/readelf.c
index b584db5..a0c20a3 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -15125,6 +15125,12 @@ print_gnu_note (Elf_Internal_Note *pnote)
 	  case GNU_ABI_TAG_NETBSD:
 	    osname = "NetBSD";
 	    break;
+	  case GNU_ABI_TAG_SYLLABLE:
+	    osname = "Syllable";
+	    break;
+	  case GNU_ABI_TAG_NACL:
+	    osname = "NaCl";
+	    break;
 	  default:
 	    osname = "Unknown";
 	    break;
diff --git a/gdb/configure.tgt b/gdb/configure.tgt
index 4e4d6a9..d7f083d 100644
--- a/gdb/configure.tgt
+++ b/gdb/configure.tgt
@@ -702,6 +702,7 @@ case "${targ}" in
 		gdb_osabi=GDB_OSABI_FREEBSD_ELF ;;
 *-*-linux* | *-*-uclinux*)
 		gdb_osabi=GDB_OSABI_LINUX ;;
+*-*-nacl*)	gdb_osabi=GDB_OSABI_NACL ;;
 *-*-nto*)	gdb_osabi=GDB_OSABI_QNXNTO ;;
 m68*-*-openbsd* | m88*-*-openbsd* | vax-*-openbsd*) ;;
 *-*-openbsd*)	gdb_osabi=GDB_OSABI_OPENBSD_ELF ;;
diff --git a/gdb/defs.h b/gdb/defs.h
index 44702ea..20d9eaf 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -569,6 +569,8 @@ enum gdb_osabi
   GDB_OSABI_LYNXOS178,
   GDB_OSABI_NEWLIB,
   GDB_OSABI_SDE,
+  GDB_OSABI_SYLLABLE,
+  GDB_OSABI_NACL,

   GDB_OSABI_INVALID		/* keep this last */
 };
diff --git a/gdb/osabi.c b/gdb/osabi.c
index 9d90c55..879f68b 100644
--- a/gdb/osabi.c
+++ b/gdb/osabi.c
@@ -492,6 +492,14 @@ generic_elf_osabi_sniff_abi_tag_sections (bfd
*abfd, asection *sect, void *obj)
 	      *osabi = GDB_OSABI_NETBSD_ELF;
 	      break;

+	    case GNU_ABI_TAG_SYLLABLE:
+	      *osabi = GDB_OSABI_SYLLABLE;
+	      break;
+
+	    case GNU_ABI_TAG_NACL:
+	      *osabi = GDB_OSABI_NACL;
+	      break;
+
 	    default:
 	      internal_error (__FILE__, __LINE__,
 			      _("generic_elf_osabi_sniff_abi_tag_sections: "
diff --git a/include/elf/common.h b/include/elf/common.h
index b087d9c..e6d8c14 100644
--- a/include/elf/common.h
+++ b/include/elf/common.h
@@ -635,6 +635,8 @@
 #define GNU_ABI_TAG_SOLARIS	2
 #define GNU_ABI_TAG_FREEBSD	3
 #define GNU_ABI_TAG_NETBSD	4
+#define GNU_ABI_TAG_SYLLABLE	5
+#define GNU_ABI_TAG_NACL	6

 /* Values for NetBSD .note.netbsd.ident notes.  Note name is "NetBSD".  */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]