-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libkmod: store common section off/size and use them
Currently, we repeatedly loop over the elf headers looking for five well known sections. Just do it once in kmod_elf_new() and reuse the data as needed. Note, that not all sections are guaranteed to be available, so calloc() the struct kmod_elf, so we don't rely on garbage data later on. Signed-off-by: Emil Velikov <[email protected]>
- Loading branch information
Showing
1 changed file
with
85 additions
and
29 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