Fix program header rewriting. Ensure that loadable segments and sections
authorNathan Rosenblum <nater@bleu.cs.wisc.edu>
Wed, 30 Jun 2010 20:54:46 +0000 (15:54 -0500)
committerNathan Rosenblum <nater@aemilia.cs.wisc.edu>
Wed, 30 Jun 2010 20:57:32 +0000 (15:57 -0500)
commit7b7472855c1ba61ee4a70028afcd0ecdd8186575
treed63845fa472c79e6c911a43cf24fffbc34cae813
parent83d54ccbd7c0121153a05dde8b084611be8e4df0
Fix program header rewriting. Ensure that loadable segments and sections
are emitted in the proper order (sorted by virtual address in both cases).

Fixes a bug where emitting existing sections without creating a new
section caused a null pointer dereference.

Ensures that the loadable segment created to hold new sections is placed
such that it won't clobber other loadable segments.
symtabAPI/src/emitElf-64.C
symtabAPI/src/emitElf-64.h
symtabAPI/src/emitElf.C
symtabAPI/src/emitElf.h
symtabAPI/src/emitElfStatic.C
symtabAPI/src/emitElfStatic.h