PATCH: PR binutils/3826: elf_object_p can't tell freebsd object file from standard ELF object file

Alan Modra amodra@bigpond.net.au
Fri Jan 5 03:29:00 GMT 2007
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



More information about the Binutils mailing list