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]

Re: Should rename ELFOSABI_LINUX into ELFOSABI_GNU, and drop ELFOSABI_HURD


Hallo!

On Mon, 4 Jul 2011 11:02:25 -0700, Joel Brobecker <brobecker@adacore.com> wrote:
> > 2011-07-04  Thomas Schwinge  <thomas@schwinge.name>
> > 
> > 	gdb/
> > 	* osabi.c (generic_elf_osabi_sniffer) <ELFOSABI_GNU>: Handle in the
> > 	same way as ELFOSABI_NONE.
> > 	<ELFOSABI_LINUX, ELFOSABI_HURD>: Remove cases.
> 
> Thanks for doing this. The patch looks good to me overall.  Just one
> minor comment: [...]

Ack.

> Also, we're trying to keep our lines of code, including comments to
> 70 characters (it's a soft limit). If you can fit something in under
> 80 charas but not un 70, and it looks better on one line, do it. But
> otherwise, try to stay withing the 70 chars limit.

Aha, I hadn't picked up that yet.  Will try to remember.  :-)

Committed:

ELFOSABI_GNU.

	gdb/
	* osabi.c (generic_elf_osabi_sniffer) <ELFOSABI_GNU>: Handle in the
	same way as ELFOSABI_NONE.
	<ELFOSABI_LINUX, ELFOSABI_HURD>: Remove cases.

---
 gdb/osabi.c |   13 ++++---------
 1 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/gdb/osabi.c b/gdb/osabi.c
index a264924..e161b58 100644
--- a/gdb/osabi.c
+++ b/gdb/osabi.c
@@ -514,11 +514,14 @@ generic_elf_osabi_sniffer (bfd *abfd)
   switch (elfosabi)
     {
     case ELFOSABI_NONE:
+    case ELFOSABI_GNU:
       /* When the EI_OSABI field in the ELF header is ELFOSABI_NONE
          (0), then the ELF structures in the file are conforming to
          the base specification for that machine (there are no
          OS-specific extensions).  In order to determine the real OS
-         in use we must look for OS-specific notes.  */
+         in use we must look for OS-specific notes.  The same applies
+         for ELFOSABI_GNU: this can mean GNU/Hurd, GNU/Linux, and
+         possibly more.  */
       bfd_map_over_sections (abfd,
 			     generic_elf_osabi_sniff_abi_tag_sections,
 			     &osabi);
@@ -532,14 +535,6 @@ generic_elf_osabi_sniffer (bfd *abfd)
       osabi = GDB_OSABI_NETBSD_ELF;
       break;
 
-    case ELFOSABI_LINUX:
-      osabi = GDB_OSABI_LINUX;
-      break;
-
-    case ELFOSABI_HURD:
-      osabi = GDB_OSABI_HURD;
-      break;
-
     case ELFOSABI_SOLARIS:
       osabi = GDB_OSABI_SOLARIS;
       break;
-- 
tg: (a627682..) elfosabi_gnu (depends on: master)


GrÃÃe,
 Thomas

Attachment: pgp00000.pgp
Description: PGP signature


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