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

Re: [Xen-devel] [PATCH v5 13/28] xsplice, symbols: Implement symbol name resolution on address.



On Fri, Apr 01, 2016 at 09:11:40AM -0600, Jan Beulich wrote:
> >>> On 24.03.16 at 21:00, <konrad.wilk@xxxxxxxxxx> wrote:
> > --- a/xen/arch/x86/Makefile
> > +++ b/xen/arch/x86/Makefile
> > @@ -113,12 +113,14 @@ $(TARGET)-syms: prelink.o xen.lds 
> > $(BASEDIR)/common/symbols-dummy.o
> >     $(LD) $(LDFLAGS) -T xen.lds -N prelink.o \
> >         $(BASEDIR)/common/symbols-dummy.o -o $(@D)/.$(@F).0
> >     $(NM) -pa --format=sysv $(@D)/.$(@F).0 \
> > -           | $(BASEDIR)/tools/symbols --sysv --sort >$(@D)/.$(@F).0.S
> > +           | $(BASEDIR)/tools/symbols --all-symbols --sysv --sort \
> > +           >$(@D)/.$(@F).0.S
> >     $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).0.o
> >     $(LD) $(LDFLAGS) -T xen.lds -N prelink.o \
> >         $(@D)/.$(@F).0.o -o $(@D)/.$(@F).1
> >     $(NM) -pa --format=sysv $(@D)/.$(@F).1 \
> > -           | $(BASEDIR)/tools/symbols --sysv --sort --warn-dup 
> > >$(@D)/.$(@F).1.S
> > +           | $(BASEDIR)/tools/symbols --all-symbols --sysv --sort 
> > --warn-dup \
> > +           >$(@D)/.$(@F).1.S
> 
> This addition should be dependent on CONFIG_XSPLICE, not the
> least because I expect it to bloat the symbol table quite a bit. And
> then - how come this is needed here, but not in the xen.efi rule?

I added it to xen.efi rule and got:

home/konrad/xen/xen/.xen.efi.0s.S: Assembler messages:
/home/konrad/xen/xen/.xen.efi.0s.S:21: Warning: value 0x7d2f80000543 truncated 
to 0x80000543
/home/konrad/xen/xen/.xen.efi.0s.S:22: Warning: value 0x7d2f800008b2 truncated 
to 0x800008b2
/home/konrad/xen/xen/.xen.efi.0s.S:23: Warning: value 0x7d2f800008b4 truncated 
to 0x800008b4
/home/konrad/xen/xen/.xen.efi.0s.S:24: Warning: value 0x7d2f800008b9 truncated 
to 0x800008b9
/home/konrad/xen/xen/.xen.efi.0s.S:25: Warning: value 0x7d2f8000103f truncated 
to 0x8000103f
/home/konrad/xen/xen/.xen.efi.0s.S:26: Warning: value 0x7d2f80001043 truncated 
to 0x80001043
/home/konrad/xen/xen/.xen.efi.0s.S:27: Warning: value 0x7d2f80001047 truncated 
to 0x80001047
/home/konrad/xen/xen/.xen.efi.0s.S:6746: Warning: value 0x100650000 truncated 
to 0x650000

and so on.. Not sure why. The xen.efi file boots thought?
> > +        rc = xensyms_read(&symnum, &type, &addr, name);

> > +        if ( rc )
> > +            break;
> > +
> > +        if ( !strcmp(name, symname) )
> > +        {
> > +            outaddr = addr;
> > +            break;
> > +        }
> > +    } while ( name[0] != '\0' );
> > +
> > +    return outaddr;
> > +}
> 
> Huh - a brute force linear lookup. We've got some 7,000 symbols
> right now, and I think we can't expect that to go down.

I left it as such. I will need to redo this as the xensyms_read is not
the best for this and this will need to be redone to be much faster.


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

 


Rackspace

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