[PATCH 4/5] arm64: Add missing AT() macros to vmlinux.lds.S

Will Deacon will.deacon at arm.com
Fri Dec 13 11:49:58 EST 2013


On Thu, Dec 12, 2013 at 08:39:46PM +0000, Geoff Levand wrote:
> Add missing AT() macros to vmlinux.lds to generate the sections
> properly.  Some elf file tools expect correct paddr values in
> vmlinux.
> 
> Fixes bad paddr values written to vmlinux like these:
> 
>   Program Header:
>     LOAD off 0x0000000000010000 vaddr 0xffffffc000080000 paddr 0xffffffc000080000 align 2**16
> 
> Signed-off-by: Geoff Levand <geoff at infradead.org> for Huawei, Linaro
> ---
>  arch/arm64/kernel/vmlinux.lds.S | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S
> index 6563b64..065fe40d 100644
> --- a/arch/arm64/kernel/vmlinux.lds.S
> +++ b/arch/arm64/kernel/vmlinux.lds.S
> @@ -48,11 +48,11 @@ SECTIONS
>  
>  	. = PAGE_OFFSET + TEXT_OFFSET;
>  
> -	.head.text : {
> +	.head.text : AT(ADDR(.head.text) - LOAD_OFFSET) {

Since LOAD_OFFSET is PAGE_OFFSET, does this assume that physical memory
starts at 0x0?

Will



More information about the linux-arm-kernel mailing list