aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/linux-gnu/x86_64/ffcheck.c
blob: 91dc855940efc61e615f787ca1eb6492115a028f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <elf.h>

int
ffcheck (void *maddr)
{
	Elf64_Ehdr	*ehdr=maddr;

	if (! ehdr)
		return 0;
	if (
			ehdr->e_type == 2 &&
			ehdr->e_machine == 0x3e &&
			ehdr->e_version == 1
	   )
		return 1;

	return 0;
}