This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Objdump output
- To: andy at softbookpress dot com
- Subject: Re: Objdump output
- From: Ian Lance Taylor <ian at zembu dot com>
- Date: 28 Dec 2000 13:13:14 -0800
- Date: 28 Dec 2000 13:13:14 -0800
- Cc: binutils at sources dot redhat dot com
- References: <v03007801b6714a86db49@[208.211.82.161]>
andy@softbookpress.com writes:
> I have a couple of questions about objdump -output
> 1.
> "
> Program Header:
> LOAD off 0x00008000 vaddr 0xc0038000 paddr 0xc0038000 align 2**15
> filesz 0x000aa234 memsz 0x000c4270 flags rwx
> "
> What is LOAD off ?
``LOAD'' is the type of the segment (PT_LOAD). off is short for
``offset;'' the number is the p_offset field of the segment--which is
to say, the offset of the segment data within the executable file.
> 2.
> "
> Sections:
> Idx Name Size VMA LMA File off Algn
> 0 .text.init 0000054c c0038000 c0038000 00008000 2**5
> CONTENTS, ALLOC, LOAD, READONLY, CODE
> 1 .data.init 00000328 c003854c c003854c 0000854c 2**2
> CONTENTS, ALLOC, LOAD, DATA
> 2 .text.real 00090190 c0039000 c0039000 00009000 2**5
> CONTENTS, ALLOC, LOAD, READONLY, CODE
> 3 .rodata 000098e4 c00c9190 c00c9190 00099190 2**2
> CONTENTS, ALLOC, LOAD, READONLY, DATA
> 4 __ex_table 00000ce0 c00d2a80 c00d2a80 000a2a80 2**3
> CONTENTS, ALLOC, LOAD, READONLY, DATA
> 5 .data 0000e234 c00d4000 c00d4000 000a4000 2**5
> CONTENTS, ALLOC, LOAD, DATA
> 6 .bss 0001a030 c00e2240 c00e2240 000b2240 2**4
> ALLOC
> 7 .stab 001ef57c 00000000 00000000 000b2240 2**2
> CONTENTS, READONLY, DEBUGGING
> 8 .stabstr 000a62e2 00000000 00000000 002a17bc 2**0
> CONTENTS, READONLY, DEBUGGING
> 9 .comment 00001cc0 00000000 00000000 00347a9e 2**0
> CONTENTS, READONLY
> 10 .text 00000000 c0038000 c0038000 0034975e 2**0
> CONTENTS, READONLY"
>
> What are "CONTENTS, ALLOC, LOAD, READONLY, CODE" ,etc ? Are they runtime
> directives ?
They are flags set on the section. I don't know what you mean by
runtime directives. These flags tell programs how the sections should
be interpreted.
> Where can I find the description of how they are interpreted ?
I don't know. I thought they were documented somewhere, but I'm not
sure that they really are.
Briefly, CONTENTS means that the section has contents, ALLOC means
that the section should be allocated in memory space when the program
is executed, LOAD means that the contents of the section should be
loaded into memory, READONLY means that the allocated memory should be
marked as read only when the program is run, CODE means that the
section contains code, DATA means that the section contains data
(i.e., not code), DEBUGGING means that the section contains debugging
information.
Ian