diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2013-11-20 22:15:00 +1100 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-11-21 09:19:17 +1100 |
commit | 373c76d62240cd3c1a3af42440b0a73cb7296bda (patch) | |
tree | 2d42b5eb695ef1b2ead78147af26a72e6af9e5c2 /arch/powerpc/include/asm/elf.h | |
parent | e844b1eeae42dc93bf13e67812a95ee7b58be8c7 (diff) | |
download | lwn-373c76d62240cd3c1a3af42440b0a73cb7296bda.tar.gz lwn-373c76d62240cd3c1a3af42440b0a73cb7296bda.zip |
powerpc: Add TIF_ELF2ABI flag.
Little endian ppc64 is getting an exciting new ABI. This is reflected
by the bottom two bits of e_flags in the ELF header:
0 == legacy binaries (v1 ABI)
1 == binaries using the old ABI (compiled with a new toolchain)
2 == binaries using the new ABI.
We store this in a thread flag, because we need to set it in core
dumps and for signal delivery. Our chief concern is that it doesn't
use function descriptors.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/include/asm/elf.h')
-rw-r--r-- | arch/powerpc/include/asm/elf.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/elf.h b/arch/powerpc/include/asm/elf.h index cc0655a702a7..6d0e2369fe81 100644 --- a/arch/powerpc/include/asm/elf.h +++ b/arch/powerpc/include/asm/elf.h @@ -86,6 +86,8 @@ typedef elf_vrregset_t elf_fpxregset_t; #ifdef __powerpc64__ # define SET_PERSONALITY(ex) \ do { \ + if (((ex).e_flags & 0x3) == 2) \ + set_thread_flag(TIF_ELF2ABI); \ if ((ex).e_ident[EI_CLASS] == ELFCLASS32) \ set_thread_flag(TIF_32BIT); \ else \ |