plt.c revision f728123bd75a65a6a1536e198c3c30719e494e71
1#include <gelf.h>
2#include "common.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(Process *proc, struct library_symbol *sym) {
13	return sym->enter_addr;
14}
15