[CRIU] [PATCH 2/2] compel: Add missing 32s support

Dmitry Safonov dsafonov at virtuozzo.com
Tue Apr 19 05:00:00 PDT 2016


On 04/19/2016 02:52 PM, Cyrill Gorcunov wrote:
> On Tue, Apr 19, 2016 at 02:29:49PM +0300, Dmitry Safonov wrote:
>> To be correct - after this patch from the second part, which
>> adds this kind of relocation:
>> https://github.com/0x7f454c46/criu/commit/7f1eb57e9e376dacc83cb9f96ebe55c02768713a
>> Before I didn't get this relocation on compile before it.
> mov will produce absolute address which should be addressed
> during relocation resolving, but I would rather stick with
> lea and figure out why it get broken earlier?

That's because parasite_service declared as:
int __used __parasite_entry parasite_service(unsigned int cmd, void *args)

So the first parameter is number, not a pointer to number.
And for the x86_64 we're doing the same:
 >    movl    __export_parasite_cmd(%rip), %edi
 >    leaq    __export_parasite_args(%rip), %rsi
 >    call    parasite_service

That's omitting broken offset (label 1/2 change) :)

-- 
Regards,
Dmitry Safonov



More information about the CRIU mailing list