diff mbox

x86: put kexec_reloc in its own section

Message ID 56EAE6B202000078000DDFC5@prv-mh.provo.novell.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jan Beulich March 17, 2016, 4:17 p.m. UTC
Since it wants to be page aligned, this alignment would force pointless
alignment of .text in the intermediate built_in.o file(s), needlessly
growing the overall text and binary size.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
x86: put kexec_reloc in its own section

Since it wants to be page aligned, this alignment would force pointless
alignment of .text in the intermediate built_in.o file(s), needlessly
growing the overall text and binary size.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/arch/x86/x86_64/kexec_reloc.S
+++ b/xen/arch/x86/x86_64/kexec_reloc.S
@@ -18,7 +18,7 @@
 #include <asm/page.h>
 #include <asm/machine_kexec.h>
 
-        .text
+        .section .text.kexec, "ax", @progbits
         .align PAGE_SIZE
         .code64
 
--- a/xen/arch/x86/xen.lds.S
+++ b/xen/arch/x86/xen.lds.S
@@ -49,6 +49,7 @@ SECTIONS
        *(.text.cold)
        *(.text.unlikely)
        *(.fixup)
+       *(.text.kexec)
        *(.gnu.warning)
        _etext = .;             /* End of text section */
   } :text = 0x9090

Comments

Andrew Cooper March 17, 2016, 4:19 p.m. UTC | #1
On 17/03/16 16:17, Jan Beulich wrote:
> Since it wants to be page aligned, this alignment would force pointless
> alignment of .text in the intermediate built_in.o file(s), needlessly
> growing the overall text and binary size.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
David Vrabel March 17, 2016, 5:41 p.m. UTC | #2
On 17/03/16 16:17, Jan Beulich wrote:
> Since it wants to be page aligned, this alignment would force pointless
> alignment of .text in the intermediate built_in.o file(s), needlessly
> growing the overall text and binary size.

Acked-by: David Vrabel <david.vrabel@citrix.com>

David
diff mbox

Patch

--- a/xen/arch/x86/x86_64/kexec_reloc.S
+++ b/xen/arch/x86/x86_64/kexec_reloc.S
@@ -18,7 +18,7 @@ 
 #include <asm/page.h>
 #include <asm/machine_kexec.h>
 
-        .text
+        .section .text.kexec, "ax", @progbits
         .align PAGE_SIZE
         .code64
 
--- a/xen/arch/x86/xen.lds.S
+++ b/xen/arch/x86/xen.lds.S
@@ -49,6 +49,7 @@  SECTIONS
        *(.text.cold)
        *(.text.unlikely)
        *(.fixup)
+       *(.text.kexec)
        *(.gnu.warning)
        _etext = .;             /* End of text section */
   } :text = 0x9090