plt.c revision f13505251e6402460f6cc7ec84e0d8ca91607b4f
1#include <gelf.h>
2#include "ltrace.h"
3#include "elf.h"
4
5GElf_Addr
6arch_plt_sym_val(struct ltelf *lte, size_t ndx, GElf_Rela * rela) {
7	return lte->plt_addr + (ndx + 1)
8	    * ((lte->ehdr.e_flags & EF_CPU32) ? 24 : 12);
9}
10
11void *
12sym2addr(struct process *proc, struct library_symbol *sym) {
13	return sym->enter_addr;
14}
15