address dependent code?

Ian Lepore ian at FreeBSD.org
Wed Sep 3 22:30:12 UTC 2014


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




More information about the freebsd-arm mailing list