[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] [UNIKRAFT PATCH] plat/xen: Fix symbol displacement while linking (x86)
This patch is in. Thanks, Simon On 06.02.2018 02:00, Bruno Alvisio wrote: The current linker script might not place _libxenplat_start, shared_info or hypercall_page at locations 0x0, 0x1000 and 0x2000 respectively as it is expected by the layout. Thus, a new .text.boot section was added to ensure this symbols will be placed in the correct expected memory locations. Signed-off-by: Bruno Alvisio <bruno.alvisio@xxxxxxxxx> --- @Simon: Is it necessary to add .sections for the shared_info and hypercall pages given that they come right after _libxenplat_start? --- plat/xen/x86/entry64.S | 1 + plat/xen/x86/link64.ld | 1 + plat/xen/x86/setup.c | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/plat/xen/x86/entry64.S b/plat/xen/x86/entry64.S index bdaa05a..314bb70 100644 --- a/plat/xen/x86/entry64.S +++ b/plat/xen/x86/entry64.S @@ -52,6 +52,7 @@ ELFNOTE(Xen, XEN_ELFNOTE_XEN_VERSION, .asciz "xen-3.0").globl _libxenplat_start +.section .text.boot, "ax"_libxenplat_start: #elsediff --git a/plat/xen/x86/link64.ld b/plat/xen/x86/link64.ldindex 2842a75..dd092aa 100644 --- a/plat/xen/x86/link64.ld +++ b/plat/xen/x86/link64.ld @@ -32,6 +32,7 @@ SECTIONS . = 0x0; _text = .; /* Text and read-only data */ .text : { + *(.text.boot) *(.text) *(.gnu.warning) } = 0x2000 diff --git a/plat/xen/x86/setup.c b/plat/xen/x86/setup.c index cf8bad2..44e8908 100644 --- a/plat/xen/x86/setup.c +++ b/plat/xen/x86/setup.c @@ -156,7 +156,7 @@ static inline void _init_mem(void) uk_printd(DLVL_INFO, " max_pfn: %lx\n", max_pfn);_init_mem_build_pagetable(&start_pfn, &max_pfn);- //_init_mem_clear_bootstrap(); /* FIXME - stack or text screwed up? */ + _init_mem_clear_bootstrap(); //_init_mem_set_readonly(&_text, &_erodata); /* FIXME - shared info ro? *//* Fill out mrd array */ _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |