summaryrefslogtreecommitdiff
path: root/arch/x86/tools/relocs.h
blob: 07cdb1eca4fa60dcd80a06b5f032c97f786d4b36 (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
#ifndef RELOCS_H
#define RELOCS_H

#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <stdint.h>
#include <inttypes.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <elf.h>
#include <byteswap.h>
#define USE_BSD
#include <endian.h>
#include <regex.h>
#include <tools/le_byteshift.h>

void die(char *fmt, ...);

#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))

enum symtype {
	S_ABS,
	S_REL,
	S_SEG,
	S_LIN,
	S_NSYMTYPES
};

void process_32(FILE *fp, int use_real_mode, int as_text,
		int show_absolute_syms, int show_absolute_relocs);
void process_64(FILE *fp, int use_real_mode, int as_text,
		int show_absolute_syms, int show_absolute_relocs);

#endif /* RELOCS_H */