Mercurial > hg > chrpath
comparison 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 |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:b8f7423e385c |
|---|---|
| 1 #ifndef PROTOS_H | |
| 2 #define PROTOS_H | |
| 3 | |
| 4 #include <elf.h> | |
| 5 #include "config.h" | |
| 6 | |
| 7 #ifdef WORDS_BIGENDIAN | |
| 8 #define ELFDATA2 ELFDATA2MSB | |
| 9 #else | |
| 10 #define ELFDATA2 ELFDATA2LSB | |
| 11 #endif | |
| 12 #if SIZEOF_VOID_P == 8 | |
| 13 #define Elf_Ehdr Elf64_Ehdr | |
| 14 #define ELFCLASS ELFCLASS64 | |
| 15 #define Elf_Phdr Elf64_Phdr | |
| 16 #define Elf_Shdr Elf64_Shdr | |
| 17 #define Elf_Dyn Elf64_Dyn | |
| 18 #elif SIZEOF_VOID_P == 4 | |
| 19 #define Elf_Ehdr Elf32_Ehdr | |
| 20 #define ELFCLASS ELFCLASS32 | |
| 21 #define Elf_Phdr Elf32_Phdr | |
| 22 #define Elf_Shdr Elf32_Shdr | |
| 23 #define Elf_Dyn Elf32_Dyn | |
| 24 #else | |
| 25 #error "Unknown word size (SIZEOF_VOID_P)!" | |
| 26 #endif | |
| 27 | |
| 28 int killrpath(const char *filename); | |
| 29 int chrpath(const char *filename, const char *newpath, int convert); | |
| 30 | |
| 31 int elf_open(const char *filename, int flags, Elf_Ehdr *ehdr); | |
| 32 void elf_close(int fd); | |
| 33 int elf_find_dynamic_section(int fd, Elf_Ehdr *ehdr, Elf_Phdr *phdr); | |
| 34 const char *elf_tagname(int tag); | |
| 35 int elf_dynpath_tag(int tag); | |
| 36 | |
| 37 #endif /* PROTOS_H */ |
