-
Notifications
You must be signed in to change notification settings - Fork 304
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create-diff-object: Create __patchable_function_entries section for a…
…arch64 The mcount_loc section contains the addresses of patchable ftrace sites which is used by the ftrace infrastructure in the kernel to create a list of tracable functions and to know where to patch to enable tracing of them. On aarch64 this section is called __patchable_function_entries and is generated by the compiler. Modify kpatch_create_mcount_sections() to create the __patchable_function_entries section on aarch64 rather than an mcount_loc section. Either name will be recognised by the kernel but keep the name which is expected. In order to verify which functions should have an entry in the __patchable_function_entries section, preserve the section from the kelf_patched file. Note that any symbols not included in the output elf must be NULLed in the relocation section as it would be unsafe to access them after they're freed. Also check for the 2 required NOP instructions on function entry to be pedantic. Signed-off-by: Suraj Jitindar Singh <[email protected]>
- Loading branch information
Suraj Jitindar Singh
committed
Nov 3, 2021
1 parent
2a21437
commit a636944
Showing
1 changed file
with
71 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters