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

Re: [Xen-devel] [PATCH v2 2/3] symbols: Generate an xen-sym.map



>>> On 04.08.16 at 17:49, <konrad.wilk@xxxxxxxxxx> wrote:
> You could construct _most_ of the names of the functions
> by doing 'nm --defined' but unfortunatly you do not get the
> <file> prefix that is added on in Xen . For example:
> 
> $ cat xen-syms.symbols |grep do_domain_pause
> 0xffff82d080104920 t domain.c#do_domain_pause
> $ nm --defined xen-syms|grep do_domain_pause
> ffff82d080104920 t do_domain_pause
> 
> This is normally not an issue, but if one is doing livepatching and
> wants during build-time verify that the symbols the livepatch payloads
> will patch do correspond to the one the hypervisor has built - this helps a 
> lot.
> 
> Note that during runtime one can do:
> ffff82d080104920 t domain.c#do_domain_pause
> 
> But one may not want to build and verify a livepatch on the same host.

Well, I'm not particularly happy about getting yet another file
produced, but so be it.

> --- a/xen/arch/arm/Makefile
> +++ b/xen/arch/arm/Makefile
> @@ -99,6 +99,9 @@ $(TARGET)-syms: prelink.o xen.lds 
> $(BASEDIR)/common/symbols-dummy.o
>           $(@D)/.$(@F).0.o -o $(@D)/.$(@F).1
>       $(NM) -pa --format=sysv $(@D)/.$(@F).1 \
>               | $(BASEDIR)/tools/symbols --sysv --sort >$(@D)/.$(@F).1.S
> +     $(NM) -pa --format=sysv $(@D)/.$(@F).1 \
> +             | $(BASEDIR)/tools/symbols --xensyms --sysv --sort \
> +             >$(@D)/$(@F).map
>       $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).1.o
>       $(LD) $(LDFLAGS) -T xen.lds -N prelink.o $(build_id_linker) \
>           $(@D)/.$(@F).1.o -o $@
> --- a/xen/arch/x86/Makefile
> +++ b/xen/arch/x86/Makefile
> @@ -135,6 +135,10 @@ $(TARGET)-syms: prelink.o xen.lds 
> $(BASEDIR)/common/symbols-dummy.o
>       $(NM) -pa --format=sysv $(@D)/.$(@F).1 \
>               | $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort 
> --warn-dup \
>               >$(@D)/.$(@F).1.S
> +     $(NM) -pa --format=sysv $(@D)/.$(@F).1 \
> +             | $(BASEDIR)/tools/symbols --xensyms --sysv --sort --warn-dup \
> +             >$(@D)/$(@F).map
> +     $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).1.o
>       $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).1.o
>       $(LD) $(LDFLAGS) -T xen.lds -N prelink.o $(build_id_linker) \
>           $(@D)/.$(@F).1.o -o $@

Why are you producing the maps from intermediate rather than
the final binaries?

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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