James Raitsev
James Raitsev

Reputation: 96391

What segment of .o file contains function xyz?

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: 119

Answers (2)

Serge C
Serge C

Reputation: 2283

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

Jerry Coffin
Jerry Coffin

Reputation: 490108

It's pretty much the same, at least assuming the .o file in question is an ELF file.

Upvotes: 1

Related Questions