Skip to content

Comments

kpatch-build: support patching weak function#508

Merged
sjenning merged 1 commit intodynup:masterfrom
libin2015:support-weak-function-v2
Oct 16, 2015
Merged

kpatch-build: support patching weak function#508
sjenning merged 1 commit intodynup:masterfrom
libin2015:support-weak-function-v2

Conversation

@libin2015
Copy link
Contributor

Before this patch, if changed function is weak symbol, it is not
be allowed to create live patch, and it will trigger the following
error:
/usr/local/libexec/kpatch/create-diff-object: ERROR: **.o:
kpatch_create_patches_sections: 2294: lookup_global_symbol *
*

And if the changed function reference the weak symbol, when loading
the patch module will trigger the following error:
module kpatch-**: overflow in relocation type ** val 0
insmod: can't insert 'kpatch-***.ko': invalid module format

This patch fix it and add support for patching weak function.

Signed-off-by: Li Bin huawei.libin@huawei.com

Before this patch, if changed function is weak symbol, it is not
be allowed to create live patch, and it will trigger the following
error:
/usr/local/libexec/kpatch/create-diff-object: ERROR: ***.o:
kpatch_create_patches_sections: 2294: lookup_global_symbol ***

And if the changed function reference the weak symbol, when loading
the patch module will trigger the following error:
module kpatch-***: overflow in relocation type *** val 0
insmod: can't insert 'kpatch-***.ko': invalid module format

This patch fix it and add support for patching weak function.

Signed-off-by: Li Bin <huawei.libin@huawei.com>
@jpoimboe
Copy link
Member

👍

sjenning added a commit that referenced this pull request Oct 16, 2015
kpatch-build: support patching weak function
@sjenning sjenning merged commit 8a182ce into dynup:master Oct 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants