summaryrefslogtreecommitdiffstats
path: root/8/platforms/android-14/arch-mips/usr/include/link.h
blob: 1c009c6d6ddeb9a971b174d95c239add0cac3a6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* 
   For building unwind-dw2-fde-glibc.c for MIPS frame unwinding,
   we need to have <link.h> that defines struct dl_phdr_info,
   ELFW(type), and dl_iterate_phdr().
*/ 

#include <sys/types.h>
#include <elf.h>

struct dl_phdr_info
{
    Elf32_Addr dlpi_addr;
    const char *dlpi_name;
    const Elf32_Phdr *dlpi_phdr;
    Elf32_Half dlpi_phnum;
};

#if _MIPS_SZPTR == 32
#define ElfW(type)	Elf32_##type
#elif _MIPS_SZPTR == 64
#define ElfW(type)	Elf64_##type
#endif

int
dl_iterate_phdr(int (*cb)(struct dl_phdr_info *info, size_t size, void *data),
                void *data);