1/*
2 * This file is part of ltrace.
3 *
4 * Copyright (C) 2013 Imagination Technologies Ltd.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * version 2 as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13 * General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
18 * 02110-1301 USA
19 */
20
21#include <gelf.h>
22
23#include "debug.h"
24#include "proc.h"
25#include "library.h"
26#include "ltrace-elf.h"
27
28GElf_Addr
29arch_plt_sym_val(struct ltelf *lte, size_t ndx, GElf_Rela * rela)
30{
31	return lte->plt_addr + ( ndx * 0x14 ) + 0x14;
32}
33
34void
35*sym2addr(struct process *proc, struct library_symbol *sym)
36{
37	return sym->enter_addr;
38}
39