Changing the default start address
jiri at gaisler.se
Tue Sep 17 08:58:40 UTC 2013
On 09/17/2013 10:33 AM, Mohammed Khoory wrote:
> I would like to shift the entire code, including the start code, to a
> specific location. I assume the start code is located at the default
> location, correct? Therefore, after the shift, the start code should be
> located at the "specific location"
The -Ttext option works fine on leon3 as long as you stay within the
SRAM/SDRAM area (0x40000000 - 0x80000000), and actually have memory
implemented on the new start address. Also note that the start address
must be aligned on a 4 Kbyte boundary to properly locate the trap table.
> Generally, I want to shift the entire code by an offset, such that anything
> that was at ADDRESS is now at ADDRESS+OFFSET, if that makes sense.
>> -----Original Message-----
>> From: rtems-users-bounces at rtems.org [mailto:rtems-users-
>> bounces at rtems.org] On Behalf Of Sebastian Huber
>> Sent: Tuesday, September 17, 2013 4:29 PM
>> To: rtems-users at rtems.org
>> Subject: Re: Changing the default start address
>> Hello Mohammed,
>> do you want to move the start code to a different memory location or do you
>> want to simply change the entry symbol of the ELF file?
>> On 2013-09-17 02:54, Mohammed Khoory wrote:
>>> For certain hardware-related reasons, I need to change the starting
>>> address of my RTEMS executable to something slightly different than
>>> what the BSP specifies. For what I understood, this should be
>>> achievable by passing -Ttext=<address> to the linker. After doing
>>> that, I can see that all the relevant symbols (like start and others)
>>> have shifted to the new address if I check with readelf.
>>> Unfortunately, when I try to run it, the executable fails at a very early
>> due to an undefined trap.
>>> Is there anything else I should consider or change when changing the
>>> start address of the executable? I tried searching the BSP headers for
>>> the old address but I couldn't find anything useful.
>>> I'm using the LEON3 BSP (sparc). The default start address is 0x40000000.
>>> Mohammed Khoory
>>> rtems-users mailing list
>>> rtems-users at rtems.org
>> Sebastian Huber, embedded brains GmbH
>> Address : Dornierstr. 4, D-82178 Puchheim, Germany
>> Phone : +49 89 189 47 41-16
>> Fax : +49 89 189 47 41-09
>> E-Mail : sebastian.huber at embedded-brains.de
>> PGP : Public key available on request.
>> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
>> rtems-users mailing list
>> rtems-users at rtems.org
> rtems-users mailing list
> rtems-users at rtems.org
More information about the users