* [U-Boot-Users] static function pointers and reallocation
@ 2007-11-02 7:33 Mattias Bostrom
2007-11-02 14:40 ` Wolfgang Denk
0 siblings, 1 reply; 3+ messages in thread
From: Mattias Bostrom @ 2007-11-02 7:33 UTC (permalink / raw)
To: u-boot
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20071102/164eb2b4/attachment.htm
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot-Users] static function pointers and reallocation
@ 2007-11-02 13:19 Mattias Bostrom
0 siblings, 0 replies; 3+ messages in thread
From: Mattias Bostrom @ 2007-11-02 13:19 UTC (permalink / raw)
To: u-boot
Hi,
?
We have?a custom board based on Lite5200B and started our development from Freescales BSP including U-Boot 1.1.5.
I have now added a U-Boot command that includes code from an earlier project. In that code there is a static vector declared at file scope with function pointers in it. When I recieve data via CAN I look up which function to start and uses the function pointer in the vector. Since the function pointers are set at compile time they point to flash memory and execution jumps to flash.
Is that as expected or? In binaries for ARM the linker has made all the reallocation. In my binary all adresses are in flash. I thought this would magically change after reallocation and my function pointer should point to the new ram adress.?Do I need to do something special to get my function pointers to point to ram?
Or do I have to initialize the vector with function pointers in runtime to get the correct adress?
I guess the GOT has something to do with this but I'm not very good at assembler so I'm not sure what happens.
Is there a "best practice" for function pointers and U-Boot?
We're using gcc 4.1.1 and glibc 2.3.8.
?
Regards,
Mattias Bostrom
Hur tr?ffade du din k?rlek? Skicka in er historia och vinn biobiljetter. http://www.spraydate.se
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot-Users] static function pointers and reallocation
2007-11-02 7:33 Mattias Bostrom
@ 2007-11-02 14:40 ` Wolfgang Denk
0 siblings, 0 replies; 3+ messages in thread
From: Wolfgang Denk @ 2007-11-02 14:40 UTC (permalink / raw)
To: u-boot
In message <163502160026354@lycos-europe.com> you wrote:
>
> Content-Type: text/html; charset="windows-1252"
> Content-Transfer-Encoding: quoted-printable
>
> <html><head><style type=3D"text/css">body{font:12px Arial;margin:3px;over=
> flow-y:auto;overflow-x:auto}p{margin:0px;}blockquote, ol, ul{margin-top:0=
> px;margin-bottom:0px;}</style></head>
>
> <body><div style=3D"DISPLAY: block; FONT-SIZE: 12px; FONT-FAMILY: Arial">=
> <DIV dir=3Dltr>
> <DIV id=3DidOWAReplyText6579 dir=3Dltr>
> <DIV dir=3Dltr>Hi,</DIV>
> <DIV dir=3Dltr> </DIV>
Message unreadable, ignore.
HTML is *FORBIDDEN* here.
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
All this doesn't alter anything, you know. The world is still full of
stupid people. They don't use their brains. They don't seem to want
to think straight. - Terry Pratchett, _Soul Music_
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-11-02 14:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-02 13:19 [U-Boot-Users] static function pointers and reallocation Mattias Bostrom
-- strict thread matches above, loose matches on Subject: below --
2007-11-02 7:33 Mattias Bostrom
2007-11-02 14:40 ` Wolfgang Denk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox