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, go] Re: Should rename ELFOSABI_LINUX into ELFOSABI_GNU, and drop ELFOSABI_HURD


Hallo!

On Thu, 30 Jun 2011 10:48:02 +0100, Nick Clifton <nickc@redhat.com> wrote:
>  > 2011-06-19  Samuel Thibault  <samuel.thibault@gnu.org>
>  >
>  >	* elf.c (_bfd_elf_set_osabi): Use ELFOSABI_GNU name instead
>  >	of ELFOSABI_LINUX alias.
>  >	* elf32-hppa.c (elf32_hppa_object_p): Likewise.
>  >	* elf64-hppa.c (elf32_hppa_object_p): Likewise.
>  >
>  > 2011-06-19  Samuel Thibault  <samuel.thibault@gnu.org>
>  >
>  >	* elfedit.c (osabis): Use ELFOSABI_GNU name instead
>  >	of ELFOSABI_LINUX alias and ELFOSABI_HURD. Add GNU alias.
>  >	* readelf.c (get_osabi_name): Likewise.
>  >	(get_symbol_binding): Likewise.
>  >	(get_symbol_type): Likewise.
>  >
>  > 2011-06-19  Samuel Thibault  <samuel.thibault@gnu.org>
>  >
>  >	* elfcpp.h (ELFOSABI): Add ELFOSABI_GNU with value of ELFOSABI_LINUX,
>  >	keep ELFOSABI_LINUX as an alias. Remove ELFOSABI_HURD.
>  >
>  > 2011-06-19  Samuel Thibault  <samuel.thibault@gnu.org>
>  >
>  >	* config/obj-elf.c (obj_elf_type): Use ELFOSABI_GNU name instead
>  >	of ELFOSABI_LINUX alias.
>  >
>  > 2011-06-19  Samuel Thibault  <samuel.thibault@gnu.org>
>  >
>  >	* common.h (ELFOSABI_GNU): Define, replaces...
>  >	(ELFOSABI_LINUX): ... this, kept as an alias.
>  >	(ELFOSABI_HURD): Remove.
> 
> Approved - please apply.

The only ELFOSABI_* occurrences in GCC trunk are in libgo.

Ian, what do you think about the following patch (untested -- what
testing does this need)?  Is it even worth keeping the ELFOSABI_LINUX
alias?  (It can never be returned via osabiStrings.)

(No ChangeLog.)

---
 libgo/go/debug/elf/elf.go      |    7 +++----
 libgo/go/debug/elf/elf_test.go |    2 +-
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/libgo/go/debug/elf/elf.go b/libgo/go/debug/elf/elf.go
index 5d45b24..0c313e5 100644
--- a/libgo/go/debug/elf/elf.go
+++ b/libgo/go/debug/elf/elf.go
@@ -119,8 +119,8 @@ const (
 	ELFOSABI_NONE       OSABI = 0   /* UNIX System V ABI */
 	ELFOSABI_HPUX       OSABI = 1   /* HP-UX operating system */
 	ELFOSABI_NETBSD     OSABI = 2   /* NetBSD */
-	ELFOSABI_LINUX      OSABI = 3   /* GNU/Linux */
-	ELFOSABI_HURD       OSABI = 4   /* GNU/Hurd */
+	ELFOSABI_GNU        OSABI = 3   /* GNU */
+	ELFOSABI_LINUX      OSABI = 3   /* GNU/Linux; alias for ELFOSABI_GNU */
 	ELFOSABI_86OPEN     OSABI = 5   /* 86Open common IA32 ABI */
 	ELFOSABI_SOLARIS    OSABI = 6   /* Solaris */
 	ELFOSABI_AIX        OSABI = 7   /* AIX */
@@ -139,8 +139,7 @@ var osabiStrings = []intName{
 	{0, "ELFOSABI_NONE"},
 	{1, "ELFOSABI_HPUX"},
 	{2, "ELFOSABI_NETBSD"},
-	{3, "ELFOSABI_LINUX"},
-	{4, "ELFOSABI_HURD"},
+	{3, "ELFOSABI_GNU"},
 	{5, "ELFOSABI_86OPEN"},
 	{6, "ELFOSABI_SOLARIS"},
 	{7, "ELFOSABI_AIX"},
diff --git a/libgo/go/debug/elf/elf_test.go b/libgo/go/debug/elf/elf_test.go
index 67b961b..118e20a 100644
--- a/libgo/go/debug/elf/elf_test.go
+++ b/libgo/go/debug/elf/elf_test.go
@@ -15,7 +15,7 @@ type nameTest struct {
 }
 
 var nameTests = []nameTest{
-	{ELFOSABI_LINUX, "ELFOSABI_LINUX"},
+	{ELFOSABI_GNU, "ELFOSABI_GNU"},
 	{ET_EXEC, "ET_EXEC"},
 	{EM_860, "EM_860"},
 	{SHN_LOPROC, "SHN_LOPROC"},
-- 
tg: (1677490..) 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]