Consider a question "Which segment of abc.o contains function foo()?"
Is this the same question as
"What section of ELF contains this function foo()?"
Sorry .. i know this is very silly. I am a bit co开发者_如何转开发nfused here.
It's pretty much the same, at least assuming the .o file in question is an ELF file.
Segments are part of loadable ELF file. No segments reside inside object files as no load address is available yet. Usually, one segment contains one or more sections. Code section
精彩评论