summaryrefslogtreecommitdiff
path: root/sysdeps/linux-gnu/mipsel/arch.h
blob: 684b54621837d6652ac4cd8ac69e5667b8a42427 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/*
 * This file is part of ltrace.
 * Copyright (C) 2006 Eric Vaitl
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA
 */

#ifndef LTRACE_MIPS_ARCH_H
#define LTRACE_MIPS_ARCH_H

#include <stddef.h>
#include <gelf.h>

#define BREAKPOINT_VALUE { 0x0d, 0x00, 0x00, 0x00 }
#define BREAKPOINT_LENGTH 4
#define DECR_PC_AFTER_BREAK 0
#define ARCH_ENDIAN_LITTLE

#define LT_ELFCLASS	ELFCLASS32
#define LT_ELF_MACHINE	EM_MIPS

#define ARCH_HAVE_LTELF_DATA
struct arch_ltelf_data {
	size_t pltgot_addr;
	size_t mips_local_gotno;
	size_t mips_gotsym;
};

#define ARCH_HAVE_FIND_DL_DEBUG
#define ARCH_HAVE_GET_SYMINFO
#define ARCH_HAVE_DYNLINK_DONE
#define ARCH_HAVE_ADD_PLT_ENTRY
#define ARCH_HAVE_ATOMIC_SINGLESTEP
#define ARCH_HAVE_SYMBOL_RET

#define ARCH_HAVE_LIBRARY_SYMBOL_DATA
enum mips_plt_type
{
	MIPS_PLT_UNRESOLVED,
	MIPS_PLT_RESOLVED,
};

struct arch_library_symbol_data {
	enum mips_plt_type type;
	GElf_Addr resolved_addr;
	GElf_Addr stub_addr;

	/* Set for FUNCs that have GOT entries but not PLT entries.  */
	int gotonly : 1;
	/* Set for FUNCs that have PLT entries that are always used.  */
	int pltalways : 1;
};

#endif /* LTRACE_MIPS_ARCH_H */