+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
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;
}
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;
}
#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
#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
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;
}
#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
+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
@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}.
{ 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" },
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";
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);
}
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";
+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.
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,
+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
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);
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)
{ "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 } },
@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
@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
+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.
#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 */
+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.
# 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}]} {
}
# 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]
}
}
# 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]
}
}
# 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]
}
}
# 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]
}