0

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.

James Raitsev
  • 92,517
  • 154
  • 335
  • 470
  • ELF is a spec, and/or an implementation of that spec. I'm pretty sure no section of either of them contains a function called `foo()`. :) – cHao Apr 13 '11 at 02:10

2 Answers2

1

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

Jerry Coffin
  • 476,176
  • 80
  • 629
  • 1,111
0

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

Serge C
  • 2,205
  • 16
  • 23