This is the mail archive of the ecos-discuss@sourceware.org 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: Objloader question


I have made some minor mods, thanks to Anthony Tonizzo and Andrew Lunn.

1. Now only uses branch island if, and only if the call is over 26bits. 
2. Uses absolute address instead of function name. 
3. Enabled by CDL option.

I have not yet got around to making it platform independent, I did not
think that I would be able to give it the time required. I am not sure
when I will be able to work on it again, so I am sending this patch so
that it is out in the open. 

NOTE: I have not fully tested it. It is still a work in progress.


-----Original Message-----
From: ecos-discuss-owner@ecos.sourceware.org
[mailto:ecos-discuss-owner@ecos.sourceware.org] On Behalf Of Retallack,
Mark (Siemens)
Sent: 26 August 2005 17:21
To: ecos-discuss@ecos.sourceware.org
Subject: RE: [ECOS] Objloader question


I have started looking at using a branch island. I have attached the
first version. Still lots of stuff that needs to be done to it.



-----Original Message-----
From: ecos-discuss-owner@ecos.sourceware.org
[mailto:ecos-discuss-owner@ecos.sourceware.org] On Behalf Of Retallack,
Mark (Siemens)
Sent: 26 August 2005 10:13
To: ecos-discuss@ecos.sourceware.org
Subject: [ECOS] Objloader question


Sorry if this is a repeat mail, problems with the mail server.

Hello, I have just been looking at the new objloader (a very useful and
cool package), and I have run into a problem. 

I have written a very simple test app to see how it works, all the app
does is export the open_library and a myapp function. When the myapp
function is loaded and called, it should just call the diag_printf
function. However the diag_printf function is stored in flash  (starts
at 0x40000000) and the myapp function is stored in ram (starts at
0x00000000). 

In the myapp.o file, the diag_printf function is defined as a
R_PPC_REL24  relocatable entry, I am running a PowerPC system which
means that it is not possible to perform a branch over the 16MB
boundary. To get this to work I need a method of making the R_PPC_REL24
perform a jump instead. 

I have looked into the following options:

Option 1: Use gcc with the -mlongcall option. 

I have looked at the gcc manual and I believe this should work, however
my version of gcc (3.2.1) does not support the -mlongcall option and I
would prefer not to have to use a different gcc toolchain.

Option 2: Add a branch island 

This would be a ram located "trampoline" than would perform a jump to
the diag_printf in flash when is is called from the myapp function. This
looks like the best long term solution, but I still need to come up with
a way of doing it.


Does anyone have any other ideas? I did think that the MMU could be used
somehow?

Thanks in advance. 


Mark Retallack
Embedded Software Engineer
Siemens Traffic Controls 
Sopers Lane, Poole, Dorset. BH17 7ER. UK.
Tel: 01202 782189
Fax: 01202 782545
www.siemenstraffic.com

Committed to quality traffic solutions and service excellence


Todays Quote:

I can't decide which WRONG TURN to make first!!  


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

Attachment: my.patch
Description: my.patch

-- 
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]