This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos 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: Simple Redboot Q's


Yes, that all the jumps and references within the code are relative, not
absolute.
I think what I'm not quite understanding is what the load does. 
I would expect the loading of an elf to involve the interpretation of
the file as to where to put it (and probably other stuff), however
loading an elf explicitly to a location (with -b) doesn't make logical
sense to me since the elf already knows where it wants to go. 
Equally baffling to me is when I load a .bin to an explicit location
then I can't just run it from that location.
Only when I load the .bin into the same memory location as what I've put
in the binary's linker script does it work (yes, I've finally managed to
get it to run my code :) even if not quite sure why).

I apologize if this is basic stuff.

m@

-----Original Message-----
From: Andrew Lunn [mailto:andrew@lunn.ch] 
Sent: 26 July 2005 17:30
To: Matt Sartori
Cc: eCos Discussion
Subject: Re: [ECOS] Simple Redboot Q's


> >Unless your code is position independent (or very smart), this is 
> >most
> certainly your problem.
> 
> Ok, good. That's something I can look at then.
> Redboot, despite being a ROM build, says it's using RAM from
0x20000000
> to 0x20005b68, so I've made
> my linker script place CODE at 0x20005b68 and DATA at 0x20008000 (with
a
> total RAM range of 0x10000).
> This, I take it, is only significant if I load it as an elf. And,
again
> if I understand correctly, when loaded as -r it just goes where I put
> it.
> Obviously there's still something I don't understand correctly 'cause
it
> doesn't work. 

Find out what position independant means. The comments above make me
think you understand what this means.

        Andrew

--------------------------------------------------------------------------------


The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited.

If you received this in error, please contact the sender or postmaster (postmaster@hanoverdisplays.com) and delete the material from any computer.

Although we routinely screen for viruses, addressees should check this e-mail and any attachment for viruses. We make no warranty as to absence of viruses in this e-mail or any attachments.

Our Company's email policy is to permit incidental personal use. If this email is of a personal nature, it must not be relied upon as expressing the views or opinions of the company.

Visit out website at www.hanoverdisplays.com



--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


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