All of lore.kernel.org
 help / color / mirror / Atom feed
From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] arm64: Align .text section to PAGE_SIZE
Date: Mon, 26 Oct 2015 20:26:09 +0000	[thread overview]
Message-ID: <20151026202608.GJ12277@leverpostej> (raw)
In-Reply-To: <20151026201611.GI12277@leverpostej>

> Perhaps it would be better to have something like the following (with
> PAGE_SHIFT sorted out to be includable in a linker script), so any
> ALIGN_DEBUG_RO* correctly aligns things to whatever boundary is
> required, and we don't need to over-align things in the !DEBUG_RO_DATA
> case.

Ignore the bit about PAGE_SHIFT and linker script. I'd got confused as I
had a local typo breaking the build.

With the below diff applied I can boot a defconfig +CONFIG_DEBUG_RODATA
+CONFIG_ARM64_64K_PAGES v4.3-rc7 kernel on Juno

Thanks,
Mark.

> ---->8----
> diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S
> index 9807333..4d77757 100644
> --- a/arch/arm64/kernel/vmlinux.lds.S
> +++ b/arch/arm64/kernel/vmlinux.lds.S
> @@ -60,9 +60,12 @@ PECOFF_FILE_ALIGNMENT = 0x200;
>  #define PECOFF_EDATA_PADDING
>  #endif
>  
> -#ifdef CONFIG_DEBUG_ALIGN_RODATA
> +#if defined(CONFIG_DEBUG_ALIGN_RODATA)
>  #define ALIGN_DEBUG_RO                 . = ALIGN(1<<SECTION_SHIFT);
>  #define ALIGN_DEBUG_RO_MIN(min)                ALIGN_DEBUG_RO
> +#elif defined(CONFIG_DEBUG_RODATA)
> +#define ALIGN_DEBUG_RO                 . = ALIGN(1<<PAGE_SHIFT);
> +#define ALIGN_DEBUG_RO_MIN(min)                ALIGN_DEBUG_RO
>  #else
>  #define ALIGN_DEBUG_RO
>  #define ALIGN_DEBUG_RO_MIN(min)                . = ALIGN(min);

  reply	other threads:[~2015-10-26 20:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-26 18:09 [PATCH v2] arm64: Align .text section to PAGE_SIZE Jeremy Linton
2015-10-26 20:16 ` Mark Rutland
2015-10-26 20:26   ` Mark Rutland [this message]
2015-10-26 21:09     ` Laura Abbott
2015-10-26 21:35       ` Mark Rutland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151026202608.GJ12277@leverpostej \
    --to=mark.rutland@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.