This is the mail archive of the binutils@sourceware.org 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 ELF p_paddr is not put to zero


On Thu, Jun 23, 2011 at 12:22 AM, Ian Lance Taylor <iant@google.com> wrote:
> Drasko DRASKOVIC <drasko.draskovic@gmail.com> writes:
>> I think that p_vaddr can be affected with
>> by --entry flag and ?explicit address, as it sound logical to me that
>> it is set to this value. Is this correct ? Does this flag however also
>> affects p_paddr at the same time ?
>
> With the GNU tools, unless you use a linker script with an AT clause,
> p_paddr will always == p_vaddr.
>
>> How do we specify p_paddr (I am talking about ROM and noMMU devices)?
>> I.e. how do we tell at which address binary should be loaded ? Is this
>> done only via linker script or there are some command line options
>> with which we can define lma ?
>
> Only via a linker script. ?Well, actually, you can use objcopy
> --change-section-lma. ?Maybe there is some other way that I'm
> forgetting. ?Most people use a linker script.
>
>> Third question is - what happens if we do not define load address at
>> all, just provide address at we want to link, i.e. address of the
>> first symbol (if this does not affect p_paddr just p_vaddr) ? How does
>> ld manage this internally - would it equalize p_paddr to p_vaddr
>> during the process and spit out binary with p_paddr = p_vaddr ?
>
> Yes.

Hi Ian,
cool.

Thanks very much for these clarifications.

BR,
Drasko


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