[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [mini-os master] x86: switch to use elfnote
commit 6d1cc81d049fdec8e8c8fe80a02fd51da1c150a5 Author: Wei Liu <wei.liu2@xxxxxxxxxx> AuthorDate: Thu Aug 18 11:15:25 2016 +0100 Commit: Wei Liu <wei.liu2@xxxxxxxxxx> CommitDate: Mon Aug 22 10:39:14 2016 +0100 x86: switch to use elfnote Use the newer ELF note interface. The generated ELF notes results in equivalent configuration. Also need to modify linker script to provide a note section. Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> Reviewed-by: Juergen Gross <jgross@xxxxxxxx> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Acked-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx> --- arch/x86/minios-x86_32.lds | 4 ++++ arch/x86/minios-x86_64.lds | 4 ++++ arch/x86/x86_32.S | 17 +++++++---------- arch/x86/x86_64.S | 15 ++++++--------- 4 files changed, 21 insertions(+), 19 deletions(-) diff --git a/arch/x86/minios-x86_32.lds b/arch/x86/minios-x86_32.lds index f5cabb6..e4e18cb 100644 --- a/arch/x86/minios-x86_32.lds +++ b/arch/x86/minios-x86_32.lds @@ -15,6 +15,10 @@ SECTIONS .rodata : { *(.rodata) *(.rodata.*) } . = ALIGN(4096); _erodata = .; + .note : { + *(.note) + *(.note.*) + } /* newlib initialization functions */ . = ALIGN(32 / 8); diff --git a/arch/x86/minios-x86_64.lds b/arch/x86/minios-x86_64.lds index 3da0a9f..f6462f3 100644 --- a/arch/x86/minios-x86_64.lds +++ b/arch/x86/minios-x86_64.lds @@ -15,6 +15,10 @@ SECTIONS .rodata : { *(.rodata) *(.rodata.*) } . = ALIGN(4096); _erodata = .; + .note : { + *(.note) + *(.note.*) + } /* newlib initialization functions */ . = ALIGN(64 / 8); diff --git a/arch/x86/x86_32.S b/arch/x86/x86_32.S index b9aa392..6dc985a 100644 --- a/arch/x86/x86_32.S +++ b/arch/x86/x86_32.S @@ -1,17 +1,14 @@ #include <mini-os/os.h> #include <mini-os/x86/arch_limits.h> +#include <mini-os/asm_macros.h> +#include <xen/elfnote.h> #include <xen/arch-x86_32.h> -.section __xen_guest - .ascii "GUEST_OS=Mini-OS" - .ascii ",XEN_VER=xen-3.0" - .ascii ",VIRT_BASE=0x0" /* &_text from minios_x86_32.lds */ - .ascii ",ELF_PADDR_OFFSET=0x0" - .ascii ",HYPERCALL_PAGE=0x2" - .ascii ",PAE=yes[extended-cr3]" - .ascii ",LOADER=generic" - .byte 0 -.text +ELFNOTE(Xen, XEN_ELFNOTE_GUEST_OS, .asciz "Mini-OS") +ELFNOTE(Xen, XEN_ELFNOTE_LOADER, .asciz "generic") +ELFNOTE(Xen, XEN_ELFNOTE_HYPERCALL_PAGE, _WORD hypercall_page) +ELFNOTE(Xen, XEN_ELFNOTE_XEN_VERSION, .asciz "xen-3.0") +ELFNOTE(Xen, XEN_ELFNOTE_PAE_MODE, .asciz "yes") .globl _start, shared_info, hypercall_page diff --git a/arch/x86/x86_64.S b/arch/x86/x86_64.S index 72921b1..8ed452f 100644 --- a/arch/x86/x86_64.S +++ b/arch/x86/x86_64.S @@ -1,16 +1,13 @@ #include <mini-os/os.h> #include <mini-os/x86/arch_limits.h> +#include <mini-os/asm_macros.h> +#include <xen/elfnote.h> #include <xen/features.h> -.section __xen_guest - .ascii "GUEST_OS=Mini-OS" - .ascii ",XEN_VER=xen-3.0" - .ascii ",VIRT_BASE=0x0" /* &_text from minios_x86_64.lds */ - .ascii ",ELF_PADDR_OFFSET=0x0" - .ascii ",HYPERCALL_PAGE=0x2" - .ascii ",LOADER=generic" - .byte 0 -.text +ELFNOTE(Xen, XEN_ELFNOTE_GUEST_OS, .asciz "Mini-OS") +ELFNOTE(Xen, XEN_ELFNOTE_LOADER, .asciz "generic") +ELFNOTE(Xen, XEN_ELFNOTE_HYPERCALL_PAGE, _WORD hypercall_page) +ELFNOTE(Xen, XEN_ELFNOTE_XEN_VERSION, .asciz "xen-3.0") #define ENTRY(X) .globl X ; X : .globl _start, shared_info, hypercall_page -- generated by git-patchbot for /home/xen/git/mini-os.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |