blob: 6f0bf6e58e8d3f1435f2762fd14af3ecba9bf7a3 [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;
Ian Wienand5570a772006-02-17 02:00:00 +010018 size_t plt_size;
Juan Cespedesd914a202004-11-10 00:15:33 +010019 Elf_Data *relplt;
20 size_t relplt_count;
21 Elf32_Word *hash;
22 int hash_malloced;
Juan Cespedes1cd999a2001-07-03 00:46:04 +020023};
24
25extern int library_num;
26extern char *library[MAX_LIBRARY];
Juan Cespedes1cd999a2001-07-03 00:46:04 +020027
Juan Cespedesd914a202004-11-10 00:15:33 +010028extern struct library_symbol *read_elf (const char *);
29
30extern GElf_Addr arch_plt_sym_val (struct ltelf *, size_t, GElf_Rela *);
Juan Cespedes96935a91997-08-09 23:45:39 +020031
Juan Cespedes1cd999a2001-07-03 00:46:04 +020032#endif