summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bfd/ChangeLog9
-rw-r--r--bfd/elf.c4
-rw-r--r--bfd/elf32-hppa.c6
-rw-r--r--bfd/elf32-i370.c2
-rw-r--r--bfd/elf64-hppa.c6
-rw-r--r--binutils/ChangeLog9
-rw-r--r--binutils/doc/binutils.texi3
-rw-r--r--binutils/elfedit.c4
-rw-r--r--binutils/readelf.c11
-rw-r--r--elfcpp/ChangeLog6
-rw-r--r--elfcpp/elfcpp.h5
-rw-r--r--gas/ChangeLog7
-rw-r--r--gas/config/obj-elf.c12
-rw-r--r--gas/config/tc-ia64.c2
-rw-r--r--gas/doc/as.texinfo5
-rw-r--r--include/elf/ChangeLog7
-rw-r--r--include/elf/common.h4
-rw-r--r--ld/testsuite/ChangeLog6
-rw-r--r--ld/testsuite/ld-ifunc/ifunc.exp14
-rw-r--r--ld/testsuite/ld-unique/unique.exp16
20 files changed, 91 insertions, 47 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 0263f148de..c4aa50d7b5 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,12 @@
+2011-07-03 Samuel Thibault <samuel.thibault@gnu.org>
+ Thomas Schwinge <thomas@schwinge.name>
+
+ * 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.
+
2011-07-01 Ian Lance Taylor <iant@google.com>
* elf32-i386.c (elf_i386_eh_frame_plt): Correct expression: change
diff --git a/bfd/elf.c b/bfd/elf.c
index 0c1eb7d771..aa40c33908 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -9610,11 +9610,11 @@ _bfd_elf_set_osabi (bfd * abfd,
i_ehdrp->e_ident[EI_OSABI] = get_elf_backend_data (abfd)->elf_osabi;
/* To make things simpler for the loader on Linux systems we set the
- osabi field to ELFOSABI_LINUX if the binary contains symbols of
+ osabi field to ELFOSABI_GNU if the binary contains symbols of
the STT_GNU_IFUNC type or STB_GNU_UNIQUE binding. */
if (i_ehdrp->e_ident[EI_OSABI] == ELFOSABI_NONE
&& elf_tdata (abfd)->has_gnu_symbols)
- i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_LINUX;
+ i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_GNU;
}
diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c
index 0e33f47a6a..7f0f2cb10e 100644
--- a/bfd/elf32-hppa.c
+++ b/bfd/elf32-hppa.c
@@ -950,9 +950,9 @@ elf32_hppa_object_p (bfd *abfd)
i_ehdrp = elf_elfheader (abfd);
if (strcmp (bfd_get_target (abfd), "elf32-hppa-linux") == 0)
{
- /* GCC on hppa-linux produces binaries with OSABI=Linux,
+ /* GCC on hppa-linux produces binaries with OSABI=GNU,
but the kernel produces corefiles with OSABI=SysV. */
- if (i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_LINUX &&
+ if (i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_GNU &&
i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_NONE) /* aka SYSV */
return FALSE;
}
@@ -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 c9f4333bba..8082927033 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 d78225b567..92adf78901 100644
--- a/bfd/elf64-hppa.c
+++ b/bfd/elf64-hppa.c
@@ -329,9 +329,9 @@ elf64_hppa_object_p (bfd *abfd)
i_ehdrp = elf_elfheader (abfd);
if (strcmp (bfd_get_target (abfd), "elf64-hppa-linux") == 0)
{
- /* GCC on hppa-linux produces binaries with OSABI=Linux,
+ /* GCC on hppa-linux produces binaries with OSABI=GNU,
but the kernel produces corefiles with OSABI=SysV. */
- if (i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_LINUX
+ if (i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_GNU
&& i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_NONE) /* aka SYSV */
return FALSE;
}
@@ -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/ChangeLog b/binutils/ChangeLog
index d358a16b44..1d243157b3 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,12 @@
+2011-07-03 Samuel Thibault <samuel.thibault@gnu.org>
+ Thomas Schwinge <thomas@schwinge.name>
+
+ * 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.
+
2011-07-01 Nick Clifton <nickc@redhat.com>
PR binutils/12325
diff --git a/binutils/doc/binutils.texi b/binutils/doc/binutils.texi
index fb1f960faf..64abcf2467 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 1805ec1b5e..4cc28465f9 100644
--- a/binutils/elfedit.c
+++ b/binutils/elfedit.c
@@ -518,8 +518,8 @@ osabis[] =
{ ELFOSABI_NONE, "none" },
{ ELFOSABI_HPUX, "HPUX" },
{ ELFOSABI_NETBSD, "NetBSD" },
- { ELFOSABI_LINUX, "Linux" },
- { ELFOSABI_HURD, "Hurd" },
+ { ELFOSABI_GNU, "GNU" },
+ { ELFOSABI_GNU, "Linux" },
{ ELFOSABI_SOLARIS, "Solaris" },
{ ELFOSABI_AIX, "AIX" },
{ ELFOSABI_IRIX, "Irix" },
diff --git a/binutils/readelf.c b/binutils/readelf.c
index c1bc2c5f8f..7922f8ae78 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -2612,8 +2612,7 @@ get_osabi_name (unsigned int osabi)
case ELFOSABI_NONE: return "UNIX - System V";
case ELFOSABI_HPUX: return "UNIX - HP-UX";
case ELFOSABI_NETBSD: return "UNIX - NetBSD";
- case ELFOSABI_LINUX: return "UNIX - Linux";
- case ELFOSABI_HURD: return "GNU/Hurd";
+ case ELFOSABI_GNU: return "UNIX - GNU";
case ELFOSABI_SOLARIS: return "UNIX - Solaris";
case ELFOSABI_AIX: return "UNIX - AIX";
case ELFOSABI_IRIX: return "UNIX - IRIX";
@@ -8587,8 +8586,8 @@ get_symbol_binding (unsigned int binding)
else if (binding >= STB_LOOS && binding <= STB_HIOS)
{
if (binding == STB_GNU_UNIQUE
- && (elf_header.e_ident[EI_OSABI] == ELFOSABI_LINUX
- /* GNU/Linux is still using the default value 0. */
+ && (elf_header.e_ident[EI_OSABI] == ELFOSABI_GNU
+ /* GNU is still using the default value 0. */
|| elf_header.e_ident[EI_OSABI] == ELFOSABI_NONE))
return "UNIQUE";
snprintf (buff, sizeof (buff), _("<OS specific>: %d"), binding);
@@ -8640,8 +8639,8 @@ get_symbol_type (unsigned int type)
}
if (type == STT_GNU_IFUNC
- && (elf_header.e_ident[EI_OSABI] == ELFOSABI_LINUX
- /* GNU/Linux is still using the default value 0. */
+ && (elf_header.e_ident[EI_OSABI] == ELFOSABI_GNU
+ /* GNU is still using the default value 0. */
|| elf_header.e_ident[EI_OSABI] == ELFOSABI_NONE))
return "IFUNC";
diff --git a/elfcpp/ChangeLog b/elfcpp/ChangeLog
index d4380aedd5..0306aa8022 100644
--- a/elfcpp/ChangeLog
+++ b/elfcpp/ChangeLog
@@ -1,3 +1,9 @@
+2011-07-03 Samuel Thibault <samuel.thibault@gnu.org>
+ Thomas Schwinge <thomas@schwinge.name>
+
+ * elfcpp.h (ELFOSABI): Add ELFOSABI_GNU with value of ELFOSABI_LINUX,
+ keep ELFOSABI_LINUX as an alias. Remove ELFOSABI_HURD.
+
2011-07-01 Ian Lance Taylor <iant@google.com>
* dwarf.h (enum DW_CFA): Define.
diff --git a/elfcpp/elfcpp.h b/elfcpp/elfcpp.h
index b3eff64c48..7a70765327 100644
--- a/elfcpp/elfcpp.h
+++ b/elfcpp/elfcpp.h
@@ -129,10 +129,9 @@ enum ELFOSABI
ELFOSABI_NONE = 0,
ELFOSABI_HPUX = 1,
ELFOSABI_NETBSD = 2,
- // ELFOSABI_LINUX is not listed in the ELF standard.
+ ELFOSABI_GNU = 3,
+ // ELFOSABI_LINUX is an alias for ELFOSABI_GNU.
ELFOSABI_LINUX = 3,
- // ELFOSABI_HURD is not listed in the ELF standard.
- ELFOSABI_HURD = 4,
ELFOSABI_SOLARIS = 6,
ELFOSABI_AIX = 7,
ELFOSABI_IRIX = 8,
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 3b833c8ccb..9e7e5943c8 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,10 @@
+2011-07-03 Samuel Thibault <samuel.thibault@gnu.org>
+ Thomas Schwinge <thomas@schwinge.name>
+
+ * config/obj-elf.c (obj_elf_type): Use ELFOSABI_GNU name instead of
+ ELFOSABI_LINUX alias.
+ * config/tc-ia64.c: Likewise.
+
2011-06-30 Paul Carroll <pcarroll@codesourcery.com>
* config/tc-arm.c (do_t_add_sub): Only allow LSL shifts of less
diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c
index 30eb8163dd..820f1cf908 100644
--- a/gas/config/obj-elf.c
+++ b/gas/config/obj-elf.c
@@ -1704,8 +1704,8 @@ obj_elf_type (int ignore ATTRIBUTE_UNUSED)
const struct elf_backend_data *bed;
bed = get_elf_backend_data (stdoutput);
- if (!(bed->elf_osabi == ELFOSABI_LINUX
- /* GNU/Linux is still using the default value 0. */
+ if (!(bed->elf_osabi == ELFOSABI_GNU
+ /* GNU is still using the default value 0. */
|| bed->elf_osabi == ELFOSABI_NONE))
as_bad (_("symbol type \"%s\" is supported only by GNU targets"),
type_name);
@@ -1716,14 +1716,14 @@ obj_elf_type (int ignore ATTRIBUTE_UNUSED)
struct elf_backend_data *bed;
bed = (struct elf_backend_data *) get_elf_backend_data (stdoutput);
- if (!(bed->elf_osabi == ELFOSABI_LINUX
- /* GNU/Linux is still using the default value 0. */
+ if (!(bed->elf_osabi == ELFOSABI_GNU
+ /* GNU is still using the default value 0. */
|| bed->elf_osabi == ELFOSABI_NONE))
as_bad (_("symbol type \"%s\" is supported only by GNU targets"),
type_name);
type = BSF_OBJECT | BSF_GNU_UNIQUE;
- /* PR 10549: Always set OSABI field to LINUX for objects containing unique symbols. */
- bed->elf_osabi = ELFOSABI_LINUX;
+ /* PR 10549: Always set OSABI field to GNU for objects containing unique symbols. */
+ bed->elf_osabi = ELFOSABI_GNU;
}
#ifdef md_elf_symbol_type
else if ((type = md_elf_symbol_type (type_name, sym, elfsym)) != -1)
diff --git a/gas/config/tc-ia64.c b/gas/config/tc-ia64.c
index 17ced7a0cf..a5100c28cf 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 7313b16cd5..d4879b6059 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/include/elf/ChangeLog b/include/elf/ChangeLog
index 76fa7e5e1f..9401ad20e3 100644
--- a/include/elf/ChangeLog
+++ b/include/elf/ChangeLog
@@ -1,3 +1,10 @@
+2011-07-03 Samuel Thibault <samuel.thibault@gnu.org>
+ Thomas Schwinge <thomas@schwinge.name>
+
+ * common.h (ELFOSABI_GNU): Define, replaces...
+ (ELFOSABI_LINUX): ... this, kept as an alias.
+ (ELFOSABI_HURD): Remove.
+
2011-06-15 Ulrich Weigand <ulrich.weigand@linaro.org>
* common.h (NT_ARM_VFP): Define.
diff --git a/include/elf/common.h b/include/elf/common.h
index 70088a09bc..1d704b1e93 100644
--- a/include/elf/common.h
+++ b/include/elf/common.h
@@ -62,8 +62,8 @@
#define ELFOSABI_NONE 0 /* UNIX System V ABI */
#define ELFOSABI_HPUX 1 /* HP-UX operating system */
#define ELFOSABI_NETBSD 2 /* NetBSD */
-#define ELFOSABI_LINUX 3 /* GNU/Linux */
-#define ELFOSABI_HURD 4 /* GNU/Hurd */
+#define ELFOSABI_GNU 3 /* GNU */
+#define ELFOSABI_LINUX 3 /* Alias for ELFOSABI_GNU */
#define ELFOSABI_SOLARIS 6 /* Solaris */
#define ELFOSABI_AIX 7 /* AIX */
#define ELFOSABI_IRIX 8 /* IRIX */
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 1d266394e3..bd2fdf5155 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2011-07-03 Samuel Thibault <samuel.thibault@gnu.org>
+ Thomas Schwinge <thomas@schwinge.name>
+
+ * ld-ifunc/ifunc.exp: Update for changed output.
+ * ld-unique/unique.exp: Likewise.
+
2011-06-27 Nick Clifton <nickc@redhat.com>
* ld-elf/elf.exp: Exlcude all v850 targets from note-3 test.
diff --git a/ld/testsuite/ld-ifunc/ifunc.exp b/ld/testsuite/ld-ifunc/ifunc.exp
index 6c20dc079b..60599ff526 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 4d73e32f33..d9e93ca981 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]
}
OpenPOWER on IntegriCloud