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