mirror of
https://github.com/dynup/kpatch
synced 2025-02-17 10:16:57 +00:00
Merge pull request #835 from jpoimboe/function-ptr-new
create-diff-object: skip dynrelas for function pointers to new functions
This commit is contained in:
commit
81fb34ed57
@ -2412,6 +2412,7 @@ static int may_need_dynrela(const struct rela *rela)
|
||||
* unlikely to be used as callbacks.
|
||||
*/
|
||||
return (function_ptr_rela(rela) &&
|
||||
toc_rela(rela)->sym->status != NEW &&
|
||||
!strchr(toc_rela(rela)->sym->name, '.'));
|
||||
}
|
||||
|
||||
|
3
test/unit/x86_64/function-ptr-new.ORIG.o
Normal file
3
test/unit/x86_64/function-ptr-new.ORIG.o
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:550e34f0e1ad732f6fb2adee2b8ef40c23959770f3885a99b03387df1ca8b479
|
||||
size 9696
|
3
test/unit/x86_64/function-ptr-new.PATCHED.o
Normal file
3
test/unit/x86_64/function-ptr-new.PATCHED.o
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8f71d13f5f4f31dc025ef9a270d7afbb3eb591d09b56a604e578ae23d05d43ff
|
||||
size 10344
|
Loading…
Reference in New Issue
Block a user