I'm a bit confused about the executable offset in ELF files. Do you know what the difference between an address and an offset is in this context? It seems obvious but if you look at the 2 sections I bolded, sometimes the offset is something like : 00400164 000164 which is obviously just the offset in memory starting from 400000. Other times the offset doesn't match the address offset : 1000018c 010190. And sometimes the address and offset match with an additional offset of 0x10000 : 10000000 010000. Is there something I'm missing having to do with dynamic linking? How does this segment linking work exactly?
EDIT: Okay, so, I did a hex dump of the executable file and I now realize that the offset is referring to the location in the actual elf file (contains elements at "addresses" 0 - 11d48.) So my question now is... how do I resolve the fact that many of the memory addresses reference address 0x00000000? They have different offsets of course but now that I know that is file specific, it means that several section alias. Do I actually use the offsets in memory addressing?
Thanks for the refs. I think I've narrowed my problem down to the fact that my executable is using a dynamic loader. I need to make the executable completely stand alone before I can even think about running the file in my simulator. Basically all I can do in terms of an OS is load memory and syscalls...