summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authornorly <ny-git@enpas.org>2013-05-27 04:57:46 +0100
committernorly <ny-git@enpas.org>2013-05-27 05:13:37 +0100
commit147edc30e5afb3fa0b17727fde972a0c1a9b275f (patch)
tree062d4667190e4921dca1b354033bfd99938480b7 /include
parent6a9a293ebbe91ff82defbfabc30f6c23ec270a54 (diff)
Abstract model more - break 'make check'
Sections are now sorted by file offset and sh_link dependencies between them as well as PHDR-SHDR dependencies are deduced as much as possible. The downside is that while the output should still work just fine, 'make check' fails to establish binary equivalence of input and output if the section table is reordered. Thankfully, in normal GCC binaries it is already ordered so we don't have to worry about this. Unfortunately the ELF spec is very lax in this regard so we have to draw a line ourselves.
Diffstat (limited to 'include')
-rw-r--r--include/libelfu/modeltypes.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/libelfu/modeltypes.h b/include/libelfu/modeltypes.h
index c944234..c02eb34 100644
--- a/include/libelfu/modeltypes.h
+++ b/include/libelfu/modeltypes.h
@@ -12,6 +12,9 @@ typedef struct ElfuScn {
Elf_Data data;
+ struct ElfuScn *link;
+
+ CIRCLEQ_ENTRY(ElfuScn) elemPhdrToScn;
CIRCLEQ_ENTRY(ElfuScn) elem;
} ElfuScn;
@@ -19,6 +22,8 @@ typedef struct ElfuScn {
typedef struct ElfuPhdr {
GElf_Phdr phdr;
+ CIRCLEQ_HEAD(PhdrToScnList, ElfuScn) phdrToScnList;
+
CIRCLEQ_ENTRY(ElfuPhdr) elem;
} ElfuPhdr;