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

Re: [UNIKRAFT PATCH 2/3] build: Provide option to localize symbols (LIBNAME_LOCALS(-y))



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

On Wed, Apr 8, 2020 at 2:11 AM Simon Kuenzer <simon.kuenzer@xxxxxxxxx> wrote:
>
> Similar to exporting symbols, this patch introduces the option to
> localize symbols. The file format of a localizing symbol files is the
> same as for exporting symbols (e.g., `exportsyms.uk`: Plain-text, one
> symbol name per line. Such files can be registered to
> `$(LIBNAME_LOCALS)` and `$(LIBNAME_LOCALS-y)`. As soon as a
> `localsyms.uk` file exists in a library import base, it is
> automatically added to the list `$(LIBNAME_LOCALS)` (similar behavior
> as the handling of `exportsyms.uk files).
>
> Signed-off-by: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>
> ---
>  support/build/Makefile.rules | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/support/build/Makefile.rules b/support/build/Makefile.rules
> index 384f24f0..251efef8 100644
> --- a/support/build/Makefile.rules
> +++ b/support/build/Makefile.rules
> @@ -190,6 +190,7 @@ UK_LIBS += $(1)
>  $(eval $(call uc,$(1))_BASE    := $(_IMPORT_BASE))
>  $(eval $(call uc,$(1))_BUILD   := $(BUILD_DIR)/$(1))
>  $(eval $(call uc,$(1))_EXPORTS += $(wildcard $(_IMPORT_BASE)/exportsyms.uk))
> +$(eval $(call uc,$(1))_LOCALS  += $(wildcard $(_IMPORT_BASE)/localsyms.uk))
>  endef
>
>  # addlib_s $libname,$switch
> @@ -207,6 +208,7 @@ $(eval $(call uc,$(1))_LIBS    += $(2))
>  $(eval $(call uc,$(2))_BASE    := $(_IMPORT_BASE))
>  $(eval $(call uc,$(2))_BUILD   := $(BUILD_DIR)/$(2))
>  $(eval $(call uc,$(2))_EXPORTS += $(wildcard $(_IMPORT_BASE)/exportsyms.uk))
> +$(eval $(call uc,$(2))_LOCALS  += $(wildcard $(_IMPORT_BASE)/localsyms.uk))
>  endef
>
>  # addplatlib_s $platname,$libname,$switch
> @@ -740,8 +742,10 @@ $(call libname2preolib,$(1)): $($(call 
> vprefix_lib,$(1),OBJS)) \
>
>  $(call libname2olib,$(1)): $(call libname2preolib,$(1)) \
>                            $($(call vprefix_lib,$(1),EXPORTS)) $($(call 
> vprefix_lib,$(1),EXPORTS-y)) \
> +                          $($(call vprefix_lib,$(1),LOCALS)) $($(call 
> vprefix_lib,$(1),LOCALS-y)) \
>         $(call build_cmd,OBJCOPY,,$(call libname2olib,$(1)),\
>                 $(OBJCOPY) $(addprefix --keep-global-symbols=,$($(call 
> vprefix_lib,$(1),EXPORTS)) $($(call vprefix_lib,$(1),EXPORTS-y))) \
> +                          $(addprefix --localize-symbols=,$($(call 
> vprefix_lib,$(1),LOCALS)) $($(call vprefix_lib,$(1),LOCALS-y))) \
>                            $(OBJCFLAGS) $(OBJCFLAGS-y) \
>                            $($(call vprefix_lib,$(1),OBJCFLAGS)) $($(call 
> vprefix_lib,$(1),OBJCFLAGS-y)) \
>                            $(call libname2preolib,$(1)) $(call 
> libname2olib,$(1)))
> --
> 2.20.1
>
>



 


Rackspace

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