Is there a way I can find from how many Relocatable files an Elf execution file Built from? And how can I associate a segment with its original Relocatable file?
Thanks in avance.
Is there a way I can find from how many Relocatable files an Elf execution file Built from?
No (at least not in general).
And how can I associate a segment with its original Relocatable file?
Any trace of the original ET_REL
file will be gone by the time the linker is done linking.
In addition, with section reordering, a single .o
can be "spread out" all over the final linked binary, and with identical code folding a single segment of the final binary can be associated with multiple .o
files.
I think http://xyproblem.info is also relevant here.