summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authornorly <ny-git@enpas.org>2013-06-15 16:27:28 +0100
committernorly <ny-git@enpas.org>2013-06-15 16:32:15 +0100
commit5868bb32246367139f0d17a989650964f90a7958 (patch)
tree7601bc12cfe88cb3c180c42fe1e3d1ee293c3559 /include
parent3c14755015340e48ae68aa874f672e7c9d289832 (diff)
Merge symbol tables. (Not fully ELF conformant)
Also, remove that nameptr member from symbols. It just *had* to cause trouble. Symbols are simply appended to the target's symbol table, which means that LOCAL symbols are not inserted at the beginning and we are thus ignoring an ELF spec. Might change that in the future, it's good enough for now and it's sure not to break anything with the old symbols. The code currently assumes that the target *has* a symbol table. We'll have to fix that, and also remove undefined and duplicate symbols.
Diffstat (limited to 'include')
-rw-r--r--include/libelfu/modelops.h5
-rw-r--r--include/libelfu/types.h1
2 files changed, 4 insertions, 2 deletions
diff --git a/include/libelfu/modelops.h b/include/libelfu/modelops.h
index 3daef52..eee7c13 100644
--- a/include/libelfu/modelops.h
+++ b/include/libelfu/modelops.h
@@ -7,6 +7,9 @@
#include <libelfu/types.h>
+#define ELFU_SYMSTR(symtabscn, off) (((char*)(symtabscn)->linkptr->data.d_buf) + (off))
+
+
size_t elfu_mPhdrCount(ElfuElf *me);
void elfu_mPhdrUpdateChildOffsets(ElfuPhdr *mp);
@@ -42,6 +45,6 @@ void elfu_mDumpElf(ElfuElf *me);
ElfuElf* elfu_mFromElf(Elf *e);
void elfu_mToElf(ElfuElf *me, Elf *e);
-void elfu_mReladd(ElfuElf *me, ElfuElf *mrel);
+void elfu_mReladd(ElfuElf *me, const ElfuElf *mrel);
#endif
diff --git a/include/libelfu/types.h b/include/libelfu/types.h
index 37e25fa..e4dd26c 100644
--- a/include/libelfu/types.h
+++ b/include/libelfu/types.h
@@ -9,7 +9,6 @@
typedef struct ElfuSym {
GElf_Word name;
- char *nameptr;
GElf_Addr value;
GElf_Word size;