]>
Commit | Line | Data |
---|---|---|
203d8a4a SSG |
1 | #include <unistd.h> |
2 | #include <stdio.h> | |
3 | #include <string.h> | |
4 | #include "util.h" | |
5 | #include "machine.h" | |
6 | #include "api/fs/fs.h" | |
7 | ||
8 | int arch__fix_module_text_start(u64 *start, const char *name) | |
9 | { | |
10 | char path[PATH_MAX]; | |
11 | ||
12 | snprintf(path, PATH_MAX, "module/%.*s/sections/.text", | |
13 | (int)strlen(name) - 2, name + 1); | |
14 | ||
15 | if (sysfs__read_ull(path, (unsigned long long *)start) < 0) | |
16 | return -1; | |
17 | ||
18 | return 0; | |
19 | } |