On 27/11/2019 15:22, Wieczorkiewicz, Pawel wrote:
> 
> 
>> On 27. Nov 2019, at 12:16, Sergey Dyasli <sergey.dya...@citrix.com> wrote:
>>
>> On 26/11/2019 18:37, Wieczorkiewicz, Pawel wrote:
>>> It looks like gcc plays the usual dirty tricks with local variables 
>>> renaming:
>>>
>>> - xen-syms
>>>  7529: ffff82d0805fed50     8 OBJECT  LOCAL  DEFAULT 4230 lastpage.22857
>>> - livepatch
>>>   289: 0000000000000000     8 OBJECT  GLOBAL DEFAULT  UND 
>>> hvm.c#lastpage.22856
>>>
>>> Then, symbols resolution by name fails..
>>>
>>> Can you please try to build the livepatch module with additional option 
>>> '—prelink' and give it a try ?
>>
>> My LP loading error is:
>>
>>    (XEN) livepatch: lp: Unknown symbol: .LC7
>>
>> When I pass --prelink to livepatch-build, it complains in a similar way:
>>
>>    livepatch-build-tools/prelink: ERROR: output.o: 
>> livepatch_resolve_symbols: 80: lookup_local_symbol .LC7 (p2m.c)
>>
> 
> Could you give this testing patch a try?
> 
> diff --git a/create-diff-object.c b/create-diff-object.c
> index 8d63940..10807d2 100644
> --- a/create-diff-object.c
> +++ b/create-diff-object.c
> @@ -839,8 +839,10 @@ static void kpatch_compare_symbols(struct list_head 
> *symlist)
>         list_for_each_entry(sym, symlist, list) {
>                 if (sym->twin)
>                         kpatch_compare_correlated_symbol(sym);
> -               else
> +               else {
>                         sym->status = NEW;
> +                       sym->include = 1;
> +               }
> 
>                 log_debug("symbol %s is %s\n", sym->name, 
> status_str(sym->status));
>         }
> 

Looks like this change fixed the issue for me!
One thing to notice is that the size of a stripped LP binary increased
from 45K to 60K.

--
Thanks,
Sergey

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to