ELF OSABI matching

Currently a binutils ELF target with ELF_OSABI defined to something
other than the default ELFOSABI_NONE will only accept object files
with e_ident[EI_OSABI] having the value ELF_OSABI.  An ELF target with
ELF_OSABI as ELFOSABI_NONE will match any e_ident[EI_OSABI] value, and
typically that target's object files will have ELFOSABI_NONE or one
other value in e_ident[EI_OSABI].  Given an object file with that
"other value" we'd like to be able to choose the correct target but
currently have no way to do so.  This patch is a step towards
implementing better target matching.

It does so by adding an ELF_OSABI_EXACT to the target description,
setting that true for all targets that currently define ELF_OSABI, and
testing the new flag for exact matching.  This will allow a future
patch to define ELF_OSABI without forcing exact matching but giving a
hint as to the best target match.

Some other tweaks are done as shown by the changelog below but no
user functional changes should be seen with this patch.

	* elf-bfd.h (struct elf_backend_data): Add osabi_exact.
	* elf.c (_bfd_elf_final_write_processing): Only set e_ident
	from elf_osabi when osabi_exact.
	* elfcode.h (elf_object_p): Test osabi_exact to reject
	mismatching e_ident.  Remove unnecessary EM_NONE test.
	* elfcore.h (elf_core_file_p): Likewise.
	* elfxx-target.h (ELF_OSABI_EXACT): Provide default of 0,
	and init elfNN_bed.
	(elf_match_priority): Handle ELF_OSABI_EXACT.
	* elf32-arm.c (ELF_OSABI_EXACT): Define and undef along with
	ELF_OSABI.
	* elf32-hppa.c: Likewise.
	* elf32-i386.c: Likewise.
	* elf32-mips.c: Likewise.
	* elf32-ppc.c: Likewise.
	* elf32-tic6x.c: Likewise.
	* elf32-visium.c: Likewise.
	* elf64-alpha.c: Likewise.
	* elf64-hppa.c: Likewise.
	* elf64-ia64-vms.c: Likewise.
	* elf64-mips.c: Likewise.
	* elf64-ppc.c: Likewise.
	* elf64-sparc.c: Likewise.
	* elf64-x86-64.c: Likewise.
	* elfn32-mips.c: Likewise.
	* elfnn-ia64.c: Likewise.
	* elf32-msp430.c: Likewise.  Don't define ELF_OSABI to
	ELFOSABI_NONE.
22 files changed