plt.c revision 3df476b28e4a9cdb43cf29fff8e89481310eb30d
1#include <gelf.h>
2#include "main.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