lkml.org 
[lkml]   [2018]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v4 18/27] xen: Adapt assembly for PIE support
From
Date
On 05/29/2018 06:15 PM, Thomas Garnier wrote:
> diff --git a/arch/x86/xen/xen-pvh.S b/arch/x86/xen/xen-pvh.S
> index ca2d3b2bf2af..82ba89ba8bb3 100644
> --- a/arch/x86/xen/xen-pvh.S
> +++ b/arch/x86/xen/xen-pvh.S
> @@ -114,8 +114,8 @@ ENTRY(pvh_start_xen)
> call xen_prepare_pvh
>
> /* startup_64 expects boot_params in %rsi. */
> - mov $_pa(pvh_bootparams), %rsi
> - mov $_pa(startup_64), %rax
> + movabs $_pa(pvh_bootparams), %rsi
> + movabs $_pa(startup_64), %rax
> jmp *%rax
>
> #else /* CONFIG_X86_64 */
> @@ -161,10 +161,15 @@ END(pvh_start_xen)
>
> .section ".init.data","aw"
> .balign 8
> + /*
> + * Use a quad for _pa(gdt_start) because PIE does not understand a
> + * long is enough. The resulting value will still be in the lower long
> + * part.
> + */
> gdt:
> .word gdt_end - gdt_start
> - .long _pa(gdt_start)
> - .word 0
> + .quad _pa(gdt_start)


With this becoming .quad 32-bit compilation fails:

/data/root/linux/arch/x86/xen/xen-pvh.S: Assembler messages:
/data/root/linux/arch/x86/xen/xen-pvh.S:147: Error: cannot represent
relocation type BFD_RELOC_64


-boris


> + .balign 8
> gdt_start:
> .quad 0x0000000000000000 /* NULL descriptor */
> #ifdef CONFIG_X86_64

\
 
 \ /
  Last update: 2018-06-01 17:41    [W:0.049 / U:0.408 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site