annotate protos.h @ 0:b8f7423e385c

import 0.13
author Peter Meerwald <pmeerw@pmeerw.net>
date Fri, 20 Jul 2012 01:51:24 +0200
parents
children bbbfb3f97919
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
1 #ifndef PROTOS_H
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
2 #define PROTOS_H
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
3
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
4 #include <elf.h>
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
5 #include "config.h"
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
6
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
7 #ifdef WORDS_BIGENDIAN
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
8 #define ELFDATA2 ELFDATA2MSB
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
9 #else
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
10 #define ELFDATA2 ELFDATA2LSB
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
11 #endif
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
12 #if SIZEOF_VOID_P == 8
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
13 #define Elf_Ehdr Elf64_Ehdr
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
14 #define ELFCLASS ELFCLASS64
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
15 #define Elf_Phdr Elf64_Phdr
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
16 #define Elf_Shdr Elf64_Shdr
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
17 #define Elf_Dyn Elf64_Dyn
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
18 #elif SIZEOF_VOID_P == 4
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
19 #define Elf_Ehdr Elf32_Ehdr
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
20 #define ELFCLASS ELFCLASS32
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
21 #define Elf_Phdr Elf32_Phdr
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
22 #define Elf_Shdr Elf32_Shdr
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
23 #define Elf_Dyn Elf32_Dyn
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
24 #else
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
25 #error "Unknown word size (SIZEOF_VOID_P)!"
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
26 #endif
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
27
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
28 int killrpath(const char *filename);
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
29 int chrpath(const char *filename, const char *newpath, int convert);
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
30
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
31 int elf_open(const char *filename, int flags, Elf_Ehdr *ehdr);
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
32 void elf_close(int fd);
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
33 int elf_find_dynamic_section(int fd, Elf_Ehdr *ehdr, Elf_Phdr *phdr);
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
34 const char *elf_tagname(int tag);
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
35 int elf_dynpath_tag(int tag);
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
36
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
37 #endif /* PROTOS_H */

Repositories maintained by Peter Meerwald, pmeerw@pmeerw.net.