lkml.org 
[lkml]   [2022]   [Sep]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 01/16] x86/boot: Align vmlinuz sections on page size
    Date
    To protect sections on page table level each section
    needs to be aligned on page size (4KB).

    Set sections alignment in linker script.

    Signed-off-by: Evgeniy Baskov <baskov@ispras.ru>
    ---
    arch/x86/boot/compressed/vmlinux.lds.S | 6 ++++++
    1 file changed, 6 insertions(+)

    diff --git a/arch/x86/boot/compressed/vmlinux.lds.S b/arch/x86/boot/compressed/vmlinux.lds.S
    index 112b2375d021..6be90f1a1198 100644
    --- a/arch/x86/boot/compressed/vmlinux.lds.S
    +++ b/arch/x86/boot/compressed/vmlinux.lds.S
    @@ -27,21 +27,27 @@ SECTIONS
    HEAD_TEXT
    _ehead = . ;
    }
    + . = ALIGN(PAGE_SIZE);
    .rodata..compressed : {
    + _compressed = .;
    *(.rodata..compressed)
    + _ecompressed = .;
    }
    + . = ALIGN(PAGE_SIZE);
    .text : {
    _text = .; /* Text */
    *(.text)
    *(.text.*)
    _etext = . ;
    }
    + . = ALIGN(PAGE_SIZE);
    .rodata : {
    _rodata = . ;
    *(.rodata) /* read-only data */
    *(.rodata.*)
    _erodata = . ;
    }
    + . = ALIGN(PAGE_SIZE);
    .data : {
    _data = . ;
    *(.data)
    --
    2.35.1
    \
     
     \ /
      Last update: 2022-09-06 12:43    [W:4.196 / U:0.220 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site