[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 1/4] xz: use initconst for hypervisor build



>>> On 19.06.19 at 13:09, <andrew.cooper3@xxxxxxxxxx> wrote:
> On 19/06/2019 12:02, Roger Pau Monne wrote:
>> Or else clang adds a .init.rodata.cst8 section to the resulting object
>> file, which is not handled by the Xen linker script and can end up
>> before the text section which contains the headers, thus resulting in
>> a not usable binary.
>>
>> Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> 
> I think Clang is actually adding a .rodata.cst8 section, and the bulk
> objcopy turns it into .init.rodata.cst8.
> 
> This is a good change so Reviewed-by: Andrew Cooper
> <andrew.cooper3@xxxxxxxxxx> (subject to some clarity over the exact
> section), but I also think this is needed as well:
> 
> diff --git a/xen/arch/x86/xen.lds.S b/xen/arch/x86/xen.lds.S
> index cb42dc8..4f23059 100644
> --- a/xen/arch/x86/xen.lds.S
> +++ b/xen/arch/x86/xen.lds.S
> @@ -206,8 +206,7 @@ SECTIONS
>  #endif
>  
>         *(.init.rodata)
> -       *(.init.rodata.rel)
> -       *(.init.rodata.str*)
> +       *(.init.rodata.*)
>  
>         . = ALIGN(POINTER_ALIGN);
>         __setup_start = .;
> @@ -221,8 +220,7 @@ SECTIONS
>         __initcall_end = .;
>  
>         *(.init.data)
> -       *(.init.data.rel)
> -       *(.init.data.rel.*)
> +       *(.init.data.*)
>         . = ALIGN(4);
>         __trampoline_rel_start = .;
>         *(.trampoline_rel)

And the same thing then also for Arm.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.