diff options
author | norly <ny-git@enpas.org> | 2013-05-30 04:01:51 +0100 |
---|---|---|
committer | norly <ny-git@enpas.org> | 2013-05-30 04:36:39 +0100 |
commit | 4addee4bda6064926b24cd1ae929303003bd9ff1 (patch) | |
tree | 10bad1be5ff2f71981fe87e1c43e171e94dacc8a /src/options.c | |
parent | eb5a1daba781013ccf168b95510d0f67f0b9c946 (diff) |
Redesign data structures, make basic reladd work.newparser
The memory ELF model is now a tree structure:
ELF +--> PHDRs +--> PHDR +--> Section
| | +--> Section
| | ...
| | \--> Section
| |
| +--> PHDR +--> Section
| | ...
| ...
|
\--> Orphaned sections +--> Section
...
\--> Section
This effectively introduces semantics into the binary blob we are
editing, and allows us to re-layout its contents much more easily
while keeping as close as possible to what is assumed to be the
original semantics.
As a side-effect, a first meta-function had to be introduced
(elfu_mScnForall) in order to traverse all leaves of the tree.
Much old code has been removed given the leaner environment
available now, and automated insertion of .text and .data sections
from object files into executables now works. However nothing else
is inserted (such as string tables or .bss) and no relocation takes
place yet.
Diffstat (limited to 'src/options.c')
-rw-r--r-- | src/options.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/options.c b/src/options.c index 198f01b..b5018d3 100644 --- a/src/options.c +++ b/src/options.c @@ -19,16 +19,16 @@ static void printUsage(char *progname) // " --print-segments Print program headers\n" // " --print-sections Print sections\n" // "\n" - "Space insertion:\n" - " off: File offset, not within any structure (headers or sections).\n" - " sz: A multiple of the maximum alignment of all PHDRs.\n" - "\n" - " --expand-nobits off Expand virtual areas (NOBITS sections and similar PHDRs).\n" - " --insert-before off,sz Insert spacing at given offset,\n" - " mapping everything before it to lower mem addresses.\n" - " --insert-after off,sz Insert spacing at given offset,\n" - " mapping everything after it to higher mem addresses.\n" - "\n" +// "Space insertion:\n" +// " off: File offset, not within any structure (headers or sections).\n" +// " sz: A multiple of the maximum alignment of all PHDRs.\n" +// "\n" +// " --expand-nobits off Expand virtual areas (NOBITS sections and similar PHDRs).\n" +// " --insert-before off,sz Insert spacing at given offset,\n" +// " mapping everything before it to lower mem addresses.\n" +// " --insert-after off,sz Insert spacing at given offset,\n" +// " mapping everything after it to higher mem addresses.\n" +// "\n" "High-level insertion:\n" " --reladd obj.o Automatically insert object file contents\n" "\n"); |