Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 03 Sep 2014 16:30:09 -0600
From:      Ian Lepore <ian@FreeBSD.org>
To:        =?ISO-8859-1?Q?Mat=EDas?= Perret Cantoni <perretcantonim@gmail.com>
Cc:        freebsd-arm@freebsd.org
Subject:   Re: address dependent code?
Message-ID:  <1409783409.1150.297.camel@revolution.hippie.lan>
In-Reply-To: <CADLKG01UUdz4M-VDVk3oYeUepiB14nf3vHmNimR5okuhZZzixw@mail.gmail.com>

index | next in thread | previous in thread | raw e-mail

On Wed, 2014-09-03 at 19:11 -0300, Matías Perret Cantoni wrote:
> Hello! I've found that for compiling ubldr I need to specify the address
> where it will be loaded and executed, and I'd like to know more about this.
> It's the first time I find that I need to specify a physical address on
> compile time.
> 
> I'm sure it's kind of a whole specific programming field, so can you point
> out some material that I can read about this? Any info about this will be
> appreciated!
> 
> Thanks in advance.
> 
> Regards, Matias.

The kernel also needs to be compiled to load at a specific address, but
you don't have to set it manually because it's hard-coded in the
std.soctype file for each chip.  In the case of ubldr, it's because
u-boot doesn't know how to do relocation, it can only load an image that
is pre-linked to run at a fixed address.  ubldr isn't built along with
the kernel, so there's nowhere to configure the load address on a
per-system basis, it has to be provided manually.

-- Ian




help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1409783409.1150.297.camel>