예제 #1
0
Elf_Arhdr *
elf_getarhdr(Elf *e)
{
	if (e == NULL) {
		LIBELF_SET_ERROR(ARGUMENT, 0);
		return (NULL);
	}

	if (e->e_flags & LIBELF_F_AR_HEADER)
		return (e->e_hdr.e_arhdr);

	return (_libelf_ar_gethdr(e));
}
예제 #2
0
Elf_Arhdr *
elf_getarhdr(Elf *e)
{
	Elf_Arhdr *arh;

	if (e == NULL) {
		LIBELF_SET_ERROR(ARGUMENT, 0);
		return (NULL);
	}

	if ((arh = e->e_arhdr) != NULL)
		return (arh);

	return (_libelf_ar_gethdr(e));
}