|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] [UNIKRAFT PATCHv5 16/46] plat/kvm: Generate linker scripts from source code
Hi Simon,
> -----Original Message-----
> From: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>
> Sent: 2018年9月12日 17:47
> To: Wei Chen (Arm Technology China) <Wei.Chen@xxxxxxx>; minios-
> devel@xxxxxxxxxxxxxxxxxxxx
> Cc: Kaly Xin (Arm Technology China) <Kaly.Xin@xxxxxxx>; nd <nd@xxxxxxx>
> Subject: Re: [Minios-devel] [UNIKRAFT PATCHv5 16/46] plat/kvm: Generate linker
> scripts from source code
>
> Hey,
>
> you never change the linker script for x86, right? It would then be
> better to keep its file name as it is (actually I will rename it to .lds
> (linker script that does not need to be run by GCC pre-processor) with
> the build system patch series). You should introduce the GCC
> pre-processor variant (as I agreed with Yuri it will be .lds.S) only for
> your Arm64 linker script.
>
I renamed x86's link64.ld => link64.lds.S, except that, everything is
the same
> Cheers,
>
> Simon
>
> On 10.08.2018 09:08, Wei Chen wrote:
> > Sometimes, using a macro in linker script will be easier for people
> > to see what is done. This means we will share macros with source code.
> > So, generate linker script from a .S will help linker script to share
> > macros with source code.
> >
> > Signed-off-by: Wei Chen <wei.chen@xxxxxxx>
> > ---
> > plat/kvm/Linker.uk | 7 +++++--
> > plat/kvm/x86/{link64.ld => link64.lds.S} | 0
> > 2 files changed, 5 insertions(+), 2 deletions(-)
> > rename plat/kvm/x86/{link64.ld => link64.lds.S} (100%)
> >
> > diff --git a/plat/kvm/Linker.uk b/plat/kvm/Linker.uk
> > index 2292b03..fbadde2 100644
> > --- a/plat/kvm/Linker.uk
> > +++ b/plat/kvm/Linker.uk
> > @@ -1,5 +1,6 @@
> > ifeq (x86_64,$(CONFIG_UK_ARCH))
> > -KVM_LDSCRIPT := -Wl,-T,$(CONFIG_UK_BASE)/plat/kvm/x86/link64.ld
> > +KVM_LDSCRIPT := -Wl,-T,$(CONFIG_UK_BASE)/plat/kvm/x86/link64.lds
> > +KVM_LDSCRIPT_FLAGS := -Wl,-T,$(KVM_LDSCRIPT)
> > KVM_LDFLAGS-y += -Wl,-m,elf_x86_64
> > endif
> >
> > @@ -14,8 +15,10 @@ $(KVM_IMAGE): $(KVM_LINK) $(KVM_LINK-y) $(UK_LINK)
> $(UK_LINK-y)
> > $(call build_cmd,OBJCOPY,,$@.o,\
> > $(OBJCOPY) -w -G kvmos_* -G _libkvmplat_entry $@.ld.o $@.o)
> > ifeq (x86_64,$(CONFIG_UK_ARCH))
> > + $(call build_cmd,CC,,link64.lds.o,\
> > + $(CC) -E $(ASINCLUDES) $(ASFLAGS) $(ASFLAGS-y) -P
> $(KVM_LDSCRIPT).S -o $(KVM_LDSCRIPT))
> > $(call build_cmd,LD,,$@,\
> > - $(LD) $(LDFLAGS) $(LDFLAGS-y) $(KVM_LDFLAGS) $(KVM_LDFLAGS-y)
> $(KVM_LDSCRIPT) $@.o -o $@)
> > + $(LD) $(LDFLAGS) $(LDFLAGS-y) $(KVM_LDFLAGS) $(KVM_LDFLAGS-y)
> $(KVM_LDSCRIPT_FLAGS) $@.o -o $@)
> > ifeq ($(CONFIG_OPTIMIZE_DBGFILE),y)
> > $(call build_cmd,OBJCOPY,,$@.dbg,\
> > $(OBJCOPY) --only-keep-debug $@ $@.dbg)
> > diff --git a/plat/kvm/x86/link64.ld b/plat/kvm/x86/link64.lds.S
> > similarity index 100%
> > rename from plat/kvm/x86/link64.ld
> > rename to plat/kvm/x86/link64.lds.S
> >
_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |