This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: PR binutils/3826: elf_object_p can't tell freebsd object file from standard ELF object file
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: "H. J. Lu" <hjl at lucon dot org>
- Cc: binutils at sources dot redhat dot com
- Date: Fri, 5 Jan 2007 13:59:46 +1030
- Subject: Re: PATCH: PR binutils/3826: elf_object_p can't tell freebsd object file from standard ELF object file
- References: <20070104153132.GA24896@lucon.org> <20070104194750.GA30044@lucon.org>
On Thu, Jan 04, 2007 at 11:47:50AM -0800, H. J. Lu wrote:
> --- bfd/elf64-hppa.c.osabi 2006-10-17 06:41:47.000000000 -0700
> +++ bfd/elf64-hppa.c 2007-01-04 11:30:52.000000000 -0800
> @@ -1198,16 +1198,9 @@ elf64_hppa_post_process_headers (abfd, l
> Elf_Internal_Ehdr * i_ehdrp;
>
> i_ehdrp = elf_elfheader (abfd);
> -
> - if (strcmp (bfd_get_target (abfd), "elf64-hppa-linux") == 0)
> - {
> - i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_LINUX;
> - }
> - else
> - {
> - i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_HPUX;
> - i_ehdrp->e_ident[EI_ABIVERSION] = 1;
> - }
> +
> + i_ehdrp->e_ident[EI_OSABI] = get_elf_backend_data (abfd)->elf_osabi;
> + i_ehdrp->e_ident[EI_ABIVERSION] = 1;
> }
You bumped ABIVERSION here for Linux. I'm also a little worried that
object files created other than by binutils might use OSABI values
other than the value we now require. For example, see the comment
in elf32_hppa_object_p.
--
Alan Modra
IBM OzLabs - Linux Technology Centre