summaryrefslogtreecommitdiff
path: root/include/libelfu/elfops.h
diff options
context:
space:
mode:
authornorly <ny-git@enpas.org>2013-02-23 15:45:17 +0000
committernorly <ny-git@enpas.org>2013-02-23 15:45:17 +0000
commitc5c86efb59ea91a64543b2b50ee1bebf6aa8a6e7 (patch)
treed316fd20bf6710dde04af3f6df00ba28ceab56d8 /include/libelfu/elfops.h
parent5b7078265bb864ddec23162b2dfc5c02dacb0e1d (diff)
Move headers for ELF-based operations together
Diffstat (limited to 'include/libelfu/elfops.h')
-rw-r--r--include/libelfu/elfops.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/libelfu/elfops.h b/include/libelfu/elfops.h
new file mode 100644
index 0000000..a57069d
--- /dev/null
+++ b/include/libelfu/elfops.h
@@ -0,0 +1,20 @@
+#ifndef __LIBELFU_ELFOPS_H_
+#define __LIBELFU_ELFOPS_H_
+
+#include <libelf.h>
+#include <gelf.h>
+
+#include <libelfu/types.h>
+
+size_t elfu_scnSizeFile(const GElf_Shdr *shdr);
+
+char* elfu_sectionName(Elf *e, Elf_Scn *scn);
+Elf_Scn* elfu_sectionByName(Elf *e, char *name);
+
+int elfu_segmentContainsSection(GElf_Phdr *phdr, GElf_Shdr *shdr);
+Elf_Scn* elfu_firstSectionInSegment(Elf *e, GElf_Phdr *phdr);
+Elf_Scn* elfu_lastSectionInSegment(Elf *e, GElf_Phdr *phdr);
+
+void elfu_fixupPhdrSelfRef(Elf *e);
+
+#endif