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: what sections get objcopied into the SREC file?


On Sun, Jul 24, 2005 at 12:45:32AM +0200, Torsten Mohr wrote:
> When i look at the program headers:
> ---- program header 1
> p_type 0x0001
> p_offset 0x0000222E
> p_vaddr 0x00800100
> p_paddr 0x0000219A
> p_filesz 0x000C
> p_memsz 0x000C
> p_flags 0x0006
> p_align 0x0001
> 
> This seems to tell that virtual addresses at 0x800100 get
> loaded at 0x219A.  Is this correct?

Yes.  paddr is the important one when using objcopy to convert to srec.
Consider rom images or programs with overlays.

> Can anybody give me some information how to treat all the
> other data, do i also need to look them up in the program
> headers?  It seems i was just lucky until now that virtual
> addresses and program addresses matched.
> 
> What do p_type and p_flags tell me, do i need to consider
> them?

See http://www.caldera.com/developers/gabi/latest/ch5.pheader.html

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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