[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Minios-devel] [UNIKRAFT PATCH v3 4/8] build: Use UK_PLAT_*_DEF_LDS in linker flag



Hi Sharan, this patch looks good.

Reviewed-by: Felipe Huici <felipe.huici@xxxxxxxxx>

-- Felipe

On 12.08.19, 16:04, "Minios-devel on behalf of Sharan Santhanam" 
<minios-devel-bounces@xxxxxxxxxxxxxxxxxxxx on behalf of 
Sharan.Santhanam@xxxxxxxxx> wrote:

    The patch uses the UK_PLAT_*_DEF_LDS in the Linker.uk of the different
    platforms while preparing the Linker flags.
    
    Signed-off-by: Sharan Santhanam <sharan.santhanam@xxxxxxxxx>
    ---
     plat/kvm/Linker.uk   | 7 ++++---
     plat/xen/Linker.uk   | 8 ++++----
     plat/xen/Makefile.uk | 1 -
     3 files changed, 8 insertions(+), 8 deletions(-)
    
    diff --git a/plat/kvm/Linker.uk b/plat/kvm/Linker.uk
    index 1281ada0..9c292acc 100644
    --- a/plat/kvm/Linker.uk
    +++ b/plat/kvm/Linker.uk
    @@ -4,7 +4,7 @@ else ifeq (arm64,$(CONFIG_UK_ARCH))
     KVM_LDFLAGS-y       += -Wl,-m,aarch64elf
     endif
     
    -KVM_LDSCRIPT     := $(call src2lds,libkvmplat,$(KVM_LDSCRIPT_SRC-y))
    +KVM_LDSCRIPT     := $(call src2lds,libkvmplat,$(UK_PLAT_KVM_DEF_LDS))
     
     ##
     ## Link image
    @@ -12,7 +12,9 @@ KVM_LDSCRIPT     := $(call 
src2lds,libkvmplat,$(KVM_LDSCRIPT_SRC-y))
     KVM_IMAGE := $(BUILD_DIR)/$(CONFIG_UK_NAME)_kvm-$(CONFIG_UK_ARCH)
     KVM_DEBUG_IMAGE := $(KVM_IMAGE).dbg
     
    -KVM_LD_SCRIPT_FLAGS := $(addprefix -Wl$(comma)-T$(comma),\
    +KVM_LD_SCRIPT_FLAGS := $(addprefix -Wl$(comma)-dT$(comma),\
    +                    $(KVM_LDSCRIPT))
    +KVM_LD_SCRIPT_FLAGS += $(addprefix -Wl$(comma)-T$(comma),\
                        $(KVM_LD_SCRIPT-y) $(EXTRA_LD_SCRIPT-y))
     
     $(KVM_DEBUG_IMAGE): $(KVM_ALIBS) $(KVM_ALIBS-y) $(KVM_OLIBS) 
$(KVM_OLIBS-y) \
    @@ -34,7 +36,6 @@ $(KVM_DEBUG_IMAGE): $(KVM_ALIBS) $(KVM_ALIBS-y) 
$(KVM_OLIBS) $(KVM_OLIBS-y) \
        $(call build_cmd,LD,,$@,\
               $(LD) $(LDFLAGS) $(LDFLAGS-y) \
                     $(KVM_LDFLAGS) $(KVM_LDFLAGS-y) \
    -                -Wl$(comma)-dT$(comma)$(call strip,$(KVM_LDSCRIPT)) \
                     $(KVM_LD_SCRIPT_FLAGS) \
                     $(KVM_IMAGE).o -o $@)
     
    diff --git a/plat/xen/Linker.uk b/plat/xen/Linker.uk
    index 211ef030..b67b45b7 100644
    --- a/plat/xen/Linker.uk
    +++ b/plat/xen/Linker.uk
    @@ -2,8 +2,7 @@ ifeq (x86_64,$(CONFIG_UK_ARCH))
     XEN_LDFLAGS-y += -Wl,-m,elf_x86_64
     endif
     
    -XEN_LDSCRIPT     := $(call src2lds,libxenplat,$(XEN_LDSCRIPT_SRC-y))
    -
    +XEN_LDSCRIPT     := $(call src2lds,libxenplat,$(UK_PLAT_XEN_DEF_LDS))
     ##
     ## Link image
     ##
    @@ -15,7 +14,9 @@ XEN_IMAGE       := 
$(BUILD_DIR)/$(CONFIG_UK_NAME)_xen-$(CONFIG_UK_ARCH)
     endif
     XEN_DEBUG_IMAGE := $(XEN_IMAGE).dbg
     
    -XEN_LD_SCRIPT_FLAGS := $(addprefix -Wl$(comma)-T$(comma),\
    +XEN_LD_SCRIPT_FLAGS := $(addprefix -Wl$(comma)-dT$(comma),\
    +                    $(XEN_LDSCRIPT))
    +XEN_LD_SCRIPT_FLAGS += $(addprefix -Wl$(comma)-T$(comma),\
                         $(XEN_LD_SCRIPT-y) $(EXTRA_LD_SCRIPT-y))
     
     $(XEN_DEBUG_IMAGE): $(XEN_ALIBS) $(XEN_ALIBS-y) $(XEN_OLIBS) 
$(XEN_OLIBS-y) \
    @@ -36,7 +37,6 @@ $(XEN_DEBUG_IMAGE): $(XEN_ALIBS) $(XEN_ALIBS-y) 
$(XEN_OLIBS) $(XEN_OLIBS-y) \
                        $(XEN_IMAGE).ld.o $(XEN_IMAGE).o)
        $(call build_cmd,LD,,$@,\
               $(LD) $(LDFLAGS) $(LDFLAGS-y) $(XEN_LDFLAGS) $(XEN_LDFLAGS-y) \
    -                -Wl$(comma)-dT$(comma)$(call strip,$(XEN_LDSCRIPT)) \
                     $(XEN_LD_SCRIPT_FLAGS) \
                     $(XEN_IMAGE).o -o $@)
     
    diff --git a/plat/xen/Makefile.uk b/plat/xen/Makefile.uk
    index 3f185256..eb4074e3 100644
    --- a/plat/xen/Makefile.uk
    +++ b/plat/xen/Makefile.uk
    @@ -93,7 +93,6 @@ LIBXENPLAT_SRCS-y              += 
$(LIBXENPLAT_BASE)/emg_console.c
     endif
     LIBXENPLAT_SRCS-y              += $(LIBXENPLAT_BASE)/shutdown.c
     LIBXENPLAT_SRCS-y              += $(LIBXENPLAT_BASE)/events.c
    -LIBXENPLAT_SRCS-y              += $(XEN_LDSCRIPT_SRC-y)
     
     ifeq ($(CONFIG_XEN_GNTTAB),y)
     LIBXENPLAT_SRCS-y              += $(LIBXENPLAT_BASE)/gnttab.c
    -- 
    2.20.1
    
    
    _______________________________________________
    Minios-devel mailing list
    Minios-devel@xxxxxxxxxxxxxxxxxxxx
    https://lists.xenproject.org/mailman/listinfo/minios-devel

_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.