From: Wolfgang Wegner <wolfgang@leila.ping.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] FPGA relocation/C environment
Date: Thu, 29 Oct 2009 14:41:00 +0100 [thread overview]
Message-ID: <20091029134059.GH3216@leila.ping.de> (raw)
In-Reply-To: <OF0C3E4304.B25B2664-ONC125765E.0047C060-C125765E.00482701@transmode.se>
Dear Joakim Tjernlund,
On Thu, Oct 29, 2009 at 02:08:05PM +0100, Joakim Tjernlund wrote:
>
> Just to avoid any misunderstandings, the GOT does not hold offsets, it holds
> absolute addresses. These addresses gets adjusted with an offset when you
> relocate.
thank you, I already understood this.
As far as I can see there is already some GOT handling in cpu/mcf532x/start.S
and the flags (-fPIC) in cpu/mcf532x/config.mk (and other coldfire ports, but
MCF532x/MCF537x is what I am currently working on for testing), but somehow
it does not work.
However, it takes some time for me to understand the assembler code,
especially the powerpc counterpart I am using as a reference.
There is a __got_start and __got_end in my u-boot.map, so I would think
the linker does behave correctly - but I did not yet check if all the
symbols (better: symbols' addresses) expected to be there are really
present:
.reloc 0x00024600 0x1990
0x00024600 __got_start = .
*(.got)
.got 0x00024600 0x1990 cpu/mcf532x/cpu_init.o
0x00025f90 __got_end = .
0x00025f90 _GOT2_TABLE_ = .
*(.got2)
0x00025f90 _FIXUP_TABLE_ = .
*(.fixup)
0x00000000 __got2_entries = ((_FIXUP_TABLE_ - _GOT2_TABLE_) >> 0x2)
0x00000000 __fixup_entries = ((. - _FIXUP_TABLE_) >> 0x2)
(flash resides at 0x0, SDRAM at 0x4000000 and CONFIG_SYS_MONITOR_BASE is
0x40020000)
Regards,
Wolfgang
next prev parent reply other threads:[~2009-10-29 13:41 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-29 8:21 [U-Boot] FPGA relocation/C environment Wolfgang Wegner
2009-10-29 11:00 ` Wolfgang Denk
2009-10-29 12:04 ` Wolfgang Wegner
2009-10-29 13:08 ` Joakim Tjernlund
2009-10-29 13:41 ` Wolfgang Wegner [this message]
2009-10-29 14:22 ` Joakim Tjernlund
2009-10-29 15:00 ` Wolfgang Wegner
2009-10-29 15:44 ` Wolfgang Wegner
2009-10-29 16:39 ` Joakim Tjernlund
2009-10-30 13:11 ` Wolfgang Wegner
2009-10-30 23:16 ` Graeme Russ
2009-10-29 15:47 ` Joakim Tjernlund
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091029134059.GH3216@leila.ping.de \
--to=wolfgang@leila.ping.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.