imxtools/sbtools: "fix" address handling in ELF
commit47f6d77690abb7bc92cf515684f9b26385d80d25
authorAmaury Pouly <amaury.pouly@gmail.com>
Sun, 16 Dec 2012 20:23:33 +0000 (16 21:23 +0100)
committerAmaury Pouly <amaury.pouly@gmail.com>
Sun, 16 Dec 2012 20:28:41 +0000 (16 21:28 +0100)
treec08c5cda221ae0a8fc1e219e11d8bf9115d51468
parent1e2e79d66809ad0f1ff598bf9dbed8e322a1f8ea
imxtools/sbtools: "fix" address handling in ELF

This is a common problem that proprietary tools don't handle ELF
files correctly. ELF sections use a virtual address and the
virtual -> physical translation is done though segments. This
allows to have a load (physical) address different from the
virtual one. Here is the trick: proprietary tools usually don't
take the pain to do the translation and just grab the virtual
address. This commit implements proper translation in elftosb1
knowing that this introduce a deviation from the behaviour of the
proprietary tool.

Change-Id: I91721a3a8dead382a0603f84ae3b35c5eb9704eb
utils/imxtools/sbtools/elftosb1.c