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 Thu, 30 Jun 2011 10:48:02 +0100, Nick Clifton <nickc@redhat.com> wrote:
>  > [ELFOSABI_GNU]
> 
> Approved - please apply.

Applied, with the following additional changed:

diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c
index c28dafa..7f0f2cb 100644
--- a/bfd/elf32-hppa.c
+++ b/bfd/elf32-hppa.c
@@ -4678,7 +4678,7 @@ elf32_hppa_elf_get_symbol_type (Elf_Internal_Sym *elf_sym, int type)
 #undef TARGET_BIG_NAME
 #define TARGET_BIG_NAME		"elf32-hppa-linux"
 #undef ELF_OSABI
-#define ELF_OSABI		ELFOSABI_LINUX
+#define ELF_OSABI		ELFOSABI_GNU
 #undef elf32_bed
 #define elf32_bed		elf32_hppa_linux_bed
 
diff --git a/bfd/elf32-i370.c b/bfd/elf32-i370.c
index c9f4333..8082927 100644
--- a/bfd/elf32-i370.c
+++ b/bfd/elf32-i370.c
@@ -1368,7 +1368,7 @@ i370_elf_relocate_section (bfd *output_bfd,
 #define ELF_MACHINE_ALT1	EM_I370_OLD
 #endif
 #define ELF_MAXPAGESIZE		0x1000
-#define ELF_OSABI		ELFOSABI_LINUX
+#define ELF_OSABI		ELFOSABI_GNU
 
 #define elf_info_to_howto	i370_elf_info_to_howto
 
diff --git a/bfd/elf64-hppa.c b/bfd/elf64-hppa.c
index 4d2e316..92adf78 100644
--- a/bfd/elf64-hppa.c
+++ b/bfd/elf64-hppa.c
@@ -4097,7 +4097,7 @@ const struct elf_size_info hppa64_elf_size_info =
 #undef TARGET_BIG_NAME
 #define TARGET_BIG_NAME			"elf64-hppa-linux"
 #undef ELF_OSABI
-#define ELF_OSABI			ELFOSABI_LINUX
+#define ELF_OSABI			ELFOSABI_GNU
 #undef elf_backend_post_process_headers
 #define elf_backend_post_process_headers _bfd_elf_set_osabi
 #undef elf64_bed
diff --git a/binutils/doc/binutils.texi b/binutils/doc/binutils.texi
index fb1f960..64abcf2 100644
--- a/binutils/doc/binutils.texi
+++ b/binutils/doc/binutils.texi
@@ -4295,7 +4295,8 @@ Set the matching input ELF file OSABI to @var{osabi}.  If
 @option{--input-osabi} isn't specified, it will match any ELF OSABIs.
 
 The supported ELF OSABIs are, @var{none}, @var{HPUX}, @var{NetBSD},
-@var{Linux}, @var{Hurd}, @var{Solaris}, @var{AIX}, @var{Irix},
+@var{GNU}, @var{Linux} (alias for @var{GNU}),
+@var{Solaris}, @var{AIX}, @var{Irix},
 @var{FreeBSD}, @var{TRU64}, @var{Modesto}, @var{OpenBSD}, @var{OpenVMS},
 @var{NSK}, @var{AROS} and @var{FenixOS}.
 
diff --git a/binutils/elfedit.c b/binutils/elfedit.c
index a8c385b..4cc2846 100644
--- a/binutils/elfedit.c
+++ b/binutils/elfedit.c
@@ -518,9 +518,8 @@ osabis[] =
   { ELFOSABI_NONE, "none" },
   { ELFOSABI_HPUX, "HPUX" },
   { ELFOSABI_NETBSD, "NetBSD" },
-  { ELFOSABI_GNU, "Linux" },
   { ELFOSABI_GNU, "GNU" },
-  { ELFOSABI_GNU, "Hurd" },
+  { ELFOSABI_GNU, "Linux" },
   { ELFOSABI_SOLARIS, "Solaris" },
   { ELFOSABI_AIX, "AIX" },
   { ELFOSABI_IRIX, "Irix" },
diff --git a/elfcpp/elfcpp.h b/elfcpp/elfcpp.h
index a11f65e..7a70765 100644
--- a/elfcpp/elfcpp.h
+++ b/elfcpp/elfcpp.h
@@ -129,9 +129,8 @@ enum ELFOSABI
   ELFOSABI_NONE = 0,
   ELFOSABI_HPUX = 1,
   ELFOSABI_NETBSD = 2,
-  // ELFOSABI_GNU is not listed in the ELF standard.
   ELFOSABI_GNU = 3,
-  // ELFOSABI_LINUX is not listed in the ELF standard, and is an alias for ELFOSABI_GNU
+  // ELFOSABI_LINUX is an alias for ELFOSABI_GNU.
   ELFOSABI_LINUX = 3,
   ELFOSABI_SOLARIS = 6,
   ELFOSABI_AIX = 7,
diff --git a/gas/config/tc-ia64.c b/gas/config/tc-ia64.c
index 17ced7a..a5100c2 100644
--- a/gas/config/tc-ia64.c
+++ b/gas/config/tc-ia64.c
@@ -614,7 +614,7 @@ pseudo_func[] =
     { "svr4",	PSEUDO_FUNC_CONST,	{ ELFOSABI_NONE } },
     { "hpux",	PSEUDO_FUNC_CONST,	{ ELFOSABI_HPUX } },
     { "nt",	PSEUDO_FUNC_CONST,	{ 2 } },		/* conflicts w/ELFOSABI_NETBSD */
-    { "linux",	PSEUDO_FUNC_CONST,	{ ELFOSABI_LINUX } },
+    { "linux",	PSEUDO_FUNC_CONST,	{ ELFOSABI_GNU } },
     { "freebsd", PSEUDO_FUNC_CONST,	{ ELFOSABI_FREEBSD } },
     { "openvms", PSEUDO_FUNC_CONST,	{ ELFOSABI_OPENVMS } },
     { "nsk",	PSEUDO_FUNC_CONST,	{ ELFOSABI_NSK } },
diff --git a/gas/doc/as.texinfo b/gas/doc/as.texinfo
index 7313b16..d4879b6 100644
--- a/gas/doc/as.texinfo
+++ b/gas/doc/as.texinfo
@@ -6438,7 +6438,7 @@ Mark the symbol as being a function name.
 @item STT_GNU_IFUNC
 @itemx gnu_indirect_function
 Mark the symbol as an indirect function when evaluated during reloc
-processing.  (This is only supported on Linux targeted assemblers).
+processing.  (This is only supported on assemblers targeting GNU systems).
 
 @item STT_OBJECT
 @itemx object
@@ -6459,7 +6459,8 @@ Does not mark the symbol in any way.  It is supported just for completeness.
 @item gnu_unique_object
 Marks the symbol as being a globally unique data object.  The dynamic linker
 will make sure that in the entire process there is just one symbol with this
-name and type in use.  (This is only supported on Linux targeted assemblers).
+name and type in use.  (This is only supported on assemblers targeting GNU
+systems).
 
 @end table
 
diff --git a/ld/testsuite/ld-ifunc/ifunc.exp b/ld/testsuite/ld-ifunc/ifunc.exp
index 6c20dc0..60599ff 100644
--- a/ld/testsuite/ld-ifunc/ifunc.exp
+++ b/ld/testsuite/ld-ifunc/ifunc.exp
@@ -244,19 +244,19 @@ if { $fails == 0 } {
 # Check the executables and shared libraries
 #
 # The linked ifunc using executables and the shared library containing
-# ifunc should have an OSABI field of LINUX.  The linked non-ifunc using
+# ifunc should have an OSABI field of GNU.  The linked non-ifunc using
 # executable should have an OSABI field of NONE (aka System V).
 
-if {! [check_osabi tmpdir/libshared_ifunc.so {UNIX - Linux}]} {
-    fail "Shared libraries containing ifunc does not have an OS/ABI field of LINUX"
+if {! [check_osabi tmpdir/libshared_ifunc.so {UNIX - GNU}]} {
+    fail "Shared libraries containing ifunc does not have an OS/ABI field of GNU"
     set fails [expr $fails + 1]
 }
-if {! [check_osabi tmpdir/local_prog {UNIX - Linux}]} {
-    fail "Local ifunc-using executable does not have an OS/ABI field of LINUX"
+if {! [check_osabi tmpdir/local_prog {UNIX - GNU}]} {
+    fail "Local ifunc-using executable does not have an OS/ABI field of GNU"
     set fails [expr $fails + 1]
 }
-if {! [check_osabi tmpdir/static_prog {UNIX - Linux}]} {
-    fail "Static ifunc-using executable does not have an OS/ABI field of LINUX"
+if {! [check_osabi tmpdir/static_prog {UNIX - GNU}]} {
+    fail "Static ifunc-using executable does not have an OS/ABI field of GNU"
     set fails [expr $fails + 1]
 }
 if {! [check_osabi tmpdir/dynamic_prog {UNIX - System V}]} {
diff --git a/ld/testsuite/ld-unique/unique.exp b/ld/testsuite/ld-unique/unique.exp
index 4d73e32..d9e93ca 100644
--- a/ld/testsuite/ld-unique/unique.exp
+++ b/ld/testsuite/ld-unique/unique.exp
@@ -149,8 +149,8 @@ if { $fails != 0 } {
 }
 
 # Check the object file.
-if {! [check_osabi tmpdir/unique.o {UNIX - Linux}]} {
-    fail "Object containing unique does not have an OS/ABI field of LINUX"
+if {! [check_osabi tmpdir/unique.o {UNIX - GNU}]} {
+    fail "Object containing unique does not have an OS/ABI field of GNU"
     set fails [expr $fails + 1]
 }
 
@@ -164,8 +164,8 @@ if { $fails == 0 } {
 }
 
 # Check the executable.
-if {! [check_osabi tmpdir/unique_prog {UNIX - Linux}]} {
-    fail "Executable containing unique does not have an OS/ABI field of LINUX"
+if {! [check_osabi tmpdir/unique_prog {UNIX - GNU}]} {
+    fail "Executable containing unique does not have an OS/ABI field of GNU"
     set fails [expr $fails + 1]
 }
 
@@ -194,8 +194,8 @@ if { $fails == 0 } {
 }
 
 # Check the unique PIC file.
-if {! [check_osabi tmpdir/unique_shared.o {UNIX - Linux}]} {
-    fail "PIC Object containing unique does not have an OS/ABI field of LINUX"
+if {! [check_osabi tmpdir/unique_shared.o {UNIX - GNU}]} {
+    fail "PIC Object containing unique does not have an OS/ABI field of GNU"
     set fails [expr $fails + 1]
 }
 
@@ -209,8 +209,8 @@ if { $fails == 0 } {
 }
 
 # Check the unique shared library.
-if {! [check_osabi tmpdir/libunique_shared.so {UNIX - Linux}]} {
-    fail "Shared library containing unique does not have an OS/ABI field of LINUX"
+if {! [check_osabi tmpdir/libunique_shared.so {UNIX - GNU}]} {
+    fail "Shared library containing unique does not have an OS/ABI field of GNU"
     set fails [expr $fails + 1]
 }
 

Final ChangeLog:

2011-07-03  Samuel Thibault  <samuel.thibault@gnu.org>
	    Thomas Schwinge  <thomas@schwinge.name>

	bfd/
	* elf.c (_bfd_elf_set_osabi): Use ELFOSABI_GNU name instead of
	ELFOSABI_LINUX alias.
	* elf32-hppa.c: Likewise.
	* elf32-i370.c: Likewise.
	* elf64-hppa.c: Likewise.

	binutils/
	* elfedit.c (osabis): Use ELFOSABI_GNU name instead of ELFOSABI_LINUX
	alias and ELFOSABI_HURD.  Add GNU alias.
	* readelf.c (get_osabi_name, get_symbol_binding, get_symbol_type):
	Likewise.
	* doc/binutils.texi <elfedit>: Update accordingly.

	elfcpp/
	* elfcpp.h (ELFOSABI): Add ELFOSABI_GNU with value of ELFOSABI_LINUX,
	keep ELFOSABI_LINUX as an alias.  Remove ELFOSABI_HURD.

	gas/
	* config/obj-elf.c (obj_elf_type): Use ELFOSABI_GNU name instead of
	ELFOSABI_LINUX alias.
	* config/tc-ia64.c: Likewise.

	include/elf/
	* common.h (ELFOSABI_GNU): Define, replaces...
	(ELFOSABI_LINUX): ... this, kept as an alias.
	(ELFOSABI_HURD): Remove.

	ld/testsuite/
	* ld-ifunc/ifunc.exp: Update for changed output.
	* ld-unique/unique.exp: Likewise.


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]