Reputation: 96581
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 confused here.
Upvotes: 0
Views: 120
Reputation: 2293
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
Upvotes: 0
Reputation: 490728
It's pretty much the same, at least assuming the .o file in question is an ELF file.
Upvotes: 1