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

Re: [Xen-devel] [PATCH] xen: arm: include .text.cold and .text.unlikely in text area



>>> On 09.06.14 at 16:28, <ian.campbell@xxxxxxxxxx> wrote:
> Otherwise functions in these sections can end up between .text and .rodata
> which is after _etext and therefore gets made non-executable.
> 
> This matches x86 (although it was done there for different reasons).
> 
> Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
> Cc: Jan Beulich <JBeulich@xxxxxxxx>
> ---
> Jan, any reason why x86 doesn't just use .text.*?

Because we want the .cold and .unlikely all adjacent, rather than
intermixed with eventual other ones (imagine mixing in a
hypothetical .text.hot).

Jan

> ---
>  xen/arch/arm/xen.lds.S |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/xen/arch/arm/xen.lds.S b/xen/arch/arm/xen.lds.S
> index e8b4f47..be55dad 100644
> --- a/xen/arch/arm/xen.lds.S
> +++ b/xen/arch/arm/xen.lds.S
> @@ -30,6 +30,8 @@ SECTIONS
>    .text : /* XXX should be AT ( XEN_PHYS_START ) */ {
>          _stext = .;            /* Text section */
>         *(.text)
> +       *(.text.cold)
> +       *(.text.unlikely)
>         *(.fixup)
>         *(.gnu.warning)
>         _etext = .;             /* End of text section */
> -- 
> 1.7.10.4




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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