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: arm-wince-pe-size reports empty .text


Shaun Jackman <sjackman@pathwayconnect.com> writes:

> What's gone wrong here? objdump won't disassemble the object file. size
> reports the .text section as having zero length. However, objdump -h
> reports the .text section as having non-zero length. There's definitely
> code in the object file.
> 
> Thanks,
> Shaun
> 
> 
> 
> $ arm-wince-pe-objdump -d foo.o
>  
> foo.o:     file format pe-arm-little
>  
> $ arm-wince-pe-size foo.o
>    text    data     bss     dec     hex filename
>       0     772     404    1176     498 foo.o
> $ arm-wince-pe-objdump -h foo.o
>  
> foo.o:     file format pe-arm-little
>  
> Sections:
> Idx Name          Size      VMA       LMA       File off  Algn
>   0 .text         00000d94  00000000  00000000  00000104  2**2
>                   CONTENTS, RELOC

The .text section is not marked LOAD or ALLOC, so size correctly
reports that it does not take up any space, and objdump -d ignores it
(objdump -D would work).

Why the .text section is not marked LOAD or ALLOC, I do not know.

Ian


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