Commit Graph

4 Commits

Author SHA1 Message Date
Josh Poimboeuf 79bd9f03ee create-diff-object: create __mcount_loc section
For ftrace to be able to trace a patched function, it requires that the
__mcount_loc section contains a pointer to the function, and that the
first instruction of the function is "callq __fentry__".

Normally that work is done by the recordmcount script, but it ignores
functions that aren't in a few standard sections (.text and a few
others).
2014-07-01 08:29:37 -05:00
Seth Jennings 2b92531df2 fix list corruption in special section handlers
The kpatch_regenerate_* functions use a local list_head to construct the
new list.  While the local list_head is copied to the sec->relas after
it is built, the neighboring nodes in the list are not updated, leading
to list corruption.

This commit uses list_replace() which updates the neighbor nodes properly.

Regression introduced by PR #117 5d36dd1.

Fixes #185.

Signed-off-by: Seth Jennings <sjenning@redhat.com>
2014-05-15 15:27:53 -05:00
Seth Jennings 207c237e48 fixup review comments
Signed-off-by: Seth Jennings <sjenning@redhat.com>
2014-05-09 23:42:11 -05:00
Seth Jennings 5d36dd1c32 convert from arrays to linked-lists
Signed-off-by: Seth Jennings <sjenning@redhat.com>
2014-05-07 10:06:41 -05:00