SHT_GNU_ATTRIBUTES advice...
David Miller
davem@davemloft.net
Sat Sep 10 20:17:00 GMT 2011
From: Alan Modra <amodra@gmail.com>
Date: Sat, 10 Sep 2011 15:29:56 +0930
> That could be fixed easily enough I think, by tweaking elf_object_p
> to accept ELFOSABI_NONE objects.
This is essentially what it seems the Solaris tools do as well.
But I wonder about the current elf_object_p test.
If the backend data specifies ELFOSABI_NONE, it accepts any OSABI
type.
This seems precarious, at best.
It means that we don't have any protection making sure that only
ELFOSABI_GNU targets accept ELFOSABI_GNU objects.
So, for example, since the Solaris/SPARC target uses ELFOSABI_NONE
currently, it will accept ELFOSABI_GNU objects.
Also, if we start setting ELFOSABI_SOLARIS for Sparc/Solaris targets,
we'll accept those ELFOSABI_SOLARIS objects on targets using
ELFOSABI_NONE.
More information about the Binutils
mailing list