This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: ELF file format


 

> -----Original Message-----
> From: Sivakumar 

>   I want to get the .text, .data, .bss from the object file.
>   Iam aware of the "size" bin utility.
>   When i give the object file as input to the "size"
> utility it is not accepting it.
>   It is saying that the file format not recognized

  Then you must be using the wrong version of the size utility for the cross
compiler you're using, or giving it the wrong filename, or somehow else
getting it wrong.  "size" works just fine with object files.  In fact, since
the ELF format is so standard across targets, pretty much any ELF-targetted
size binutil should be able to get that information from pretty much any
ELF-targetted executable or object.

>   Please help me if there is some other possibility to get 
> the information from the .o file.

  Well, you could always use something like "objdump -h" or "readelf -S" and
then use sed/awk/cut/whatever to extract the information you're after.


    cheers, 
      DaveK
-- 
Can't think of a witty .sigline today....


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]