blob: 5d878f503ddc9c0e18eb205447dcdcdda56fcab2 [file] [log] [blame]
Juan Cespedes1cd999a2001-07-03 00:46:04 +02001#ifndef LTRACE_ELF_H
2#define LTRACE_ELF_H
3
Juan Cespedesd914a202004-11-10 00:15:33 +01004#include <gelf.h>
5#include <stdlib.h>
6
Juan Cespedes5e01f651998-03-08 22:31:44 +01007#include "ltrace.h"
Juan Cespedes96935a91997-08-09 23:45:39 +02008
Juan Cespedesd914a202004-11-10 00:15:33 +01009struct ltelf
10{
11 int fd;
12 Elf *elf;
13 GElf_Ehdr ehdr;
14 Elf_Data *dynsym;
15 size_t dynsym_count;
16 const char *dynstr;
17 GElf_Addr plt_addr;
18 Elf_Data *relplt;
19 size_t relplt_count;
20 Elf32_Word *hash;
21 int hash_malloced;
Juan Cespedes1cd999a2001-07-03 00:46:04 +020022};
23
24extern int library_num;
25extern char *library[MAX_LIBRARY];
Juan Cespedes1cd999a2001-07-03 00:46:04 +020026
Juan Cespedesd914a202004-11-10 00:15:33 +010027extern struct library_symbol *read_elf (const char *);
28
29extern GElf_Addr arch_plt_sym_val (struct ltelf *, size_t, GElf_Rela *);
Juan Cespedes96935a91997-08-09 23:45:39 +020030
Juan Cespedes1cd999a2001-07-03 00:46:04 +020031#endif