diff options
author | Mark Wielaard <mjw@redhat.com> | 2014-01-04 19:19:16 +0100 |
---|---|---|
committer | Mark Wielaard <mjw@redhat.com> | 2014-01-04 19:19:21 +0100 |
commit | 0c4a868fa4c3e2a45663a78cc6d1e31089c3b0dc (patch) | |
tree | e4fa9c028be6747f4808b6b78c374422617fb907 /backends/ppc64_symbol.c | |
parent | 1051a0c8ad8b69725384de20647a982b283701f0 (diff) | |
download | elfutils-0c4a868fa4c3e2a45663a78cc6d1e31089c3b0dc.tar.gz |
backends: Add PPC64 machine_flag_check.
To distinguish between the current PPC64 ELF ABI and the revised
ELFv2 ABI that will not use function descriptors binutils started
to emit the version (currently 1) in the ehdr e_flags. Recognize
all valid versions (0, 1 or 2) in elflint by adding the hook
ppc64_machine_flag_check.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
Diffstat (limited to 'backends/ppc64_symbol.c')
-rw-r--r-- | backends/ppc64_symbol.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/backends/ppc64_symbol.c b/backends/ppc64_symbol.c index 244e40f8..212d4145 100644 --- a/backends/ppc64_symbol.c +++ b/backends/ppc64_symbol.c @@ -1,5 +1,5 @@ /* PPC64 specific symbolic name handling. - Copyright (C) 2004, 2005 Red Hat, Inc. + Copyright (C) 2004, 2005, 2014 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper <drepper@redhat.com>, 2004. @@ -110,3 +110,13 @@ ppc64_bss_plt_p (Elf *elf __attribute__ ((unused)), { return true; } + +/* Check whether machine flags are valid. PPC64 has three possible values: + 0 - for unspecified ABI, or not using any specific ABI features. + 1 - for the original ELF PPC64 ABI using function descriptors. + 2 - for the revised ELFv2 PPC64 ABI without function descriptors. */ +bool +ppc64_machine_flag_check (GElf_Word flags) +{ + return flags == 0 || flags == 1 || flags == 2; +} |