Home | History | Annotate | Download | only in include
      1 /*
      2    For building unwind-dw2-fde-glibc.c for MIPS frame unwinding,
      3    we need to have <link.h> that defines struct dl_phdr_info,
      4    ELFW(type), and dl_iterate_phdr().
      5 */
      6 
      7 #include <sys/types.h>
      8 #include <elf.h>
      9 
     10 struct dl_phdr_info
     11 {
     12     Elf32_Addr dlpi_addr;
     13     const char *dlpi_name;
     14     const Elf32_Phdr *dlpi_phdr;
     15     Elf32_Half dlpi_phnum;
     16 };
     17 
     18 #if _MIPS_SZPTR == 32
     19 #define ElfW(type)	Elf32_##type
     20 #elif _MIPS_SZPTR == 64
     21 #define ElfW(type)	Elf64_##type
     22 #endif
     23 
     24 int
     25 dl_iterate_phdr(int (*cb)(struct dl_phdr_info *info, size_t size, void *data),
     26                 void *data);
     27