[U-Boot] armv8 relocation questions

Wolfgang Denk wd at denx.de
Sat May 17 18:53:01 CEST 2014


Dear fenghua,

In message <B9A956AA-4ED7-488D-B496-90111AA45A5A at phytium.com.cn> you wrote:
> 
> 
> We can not make gcc-aarch64 do not use adrp instruction when
> constructing address of label.
> 
> So, I think the 4kb alignment would be a requirement or restriction.
> Gcc did not declare it explicitly
> due to in normal world memory are allocated with page aligned.
> If u-boot for aarch64 want to be compiled at address not 4kb aligned
> the relocated address
> should also be shifted with the same offset.

Sorry, I don't understand anything here.  At which exact place is
there any such 4 k alignment restriction?  When we relocate U-Boot, we
just process a list of addresses.  Even if the start of the image is
aligned to a 4 k boundary, there are a zillion of other addresses that
are not, and these can be relocated just fine.

So why exactly would there be such a restriction on the start address
of the image?  Note especially, that the start address of the image is
just where the text segment starts - it is not necessarily the entry
point address where code execution begines.


Best regards,

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 women should know how to take care of children. Most of them will
have a husband some day.                          - Franklin P. Jones


More information about the U-Boot mailing list