-
Notifications
You must be signed in to change notification settings - Fork 5
/
ld.h
31 lines (27 loc) · 844 Bytes
/
ld.h
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
/* Symbols live in a set of hashed lists indexed by name. Only one
instance of each name ever exists. */
struct symbol
{
struct symbol *next;
struct object *definedby;
char name[NAMELEN];
addr_t value;
uint16_t number; /* Needed when doing ld -r */
uint8_t type;
uint8_t flags;
};
struct object {
struct object *next;
struct symbol **syment;
/* We might want to store a subset of this */
struct objhdr *oh;
addr_t base[15]; /* Base address we select for this object */
int nsym;
const char *path; /* We need more for library nodes.. */
off_t off; /* For libraries */
};
#define NHASH 64 /* Must be a power of 2 */
/* Methods shared for use in target modules */
extern void warning(const char *p);
extern void error(const char *p);
extern unsigned io_readb(uint_fast8_t *ch);