Looking around GCC, ELF and OBJDump, I ask myself a question.
When I insert a label in ASM code in a function (the main for example).
In C :
Code: Select all
int main(int argc, char* argv[])
{
.....
.....
.....
.....
.....
.....
.....
__asm__ __volatile__("START:");
.....
.....
.....
.....
.....
.....
.....
__asm__ __volatile__("END:");
return 0;
}
In ELF :
I found out the written labels in the C code.
8c010242 <START>:
8c010242: .....
8c010244: .....
8c010246: .....
8c010248: .....
8c01024a: .....
8c01024c: .....
8c01024e: .....
8c010250: .....
8c010252: .....
8c010254: .....
8c010256: .....
8c010258: .....
8c01025a <END>:
But when I try to "Hexedit" the ELF file, searching for the labels ("START:", "START" ...), i did not found anything.
So how could OBJDump write at the correct place the desired label in the code as those labels seem to not exist in ELF file.
Thanks for your explanations.