Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at v4.16 20 lines 428 B view raw
1// SPDX-License-Identifier: GPL-2.0 2#include <unistd.h> 3#include <stdio.h> 4#include <string.h> 5#include "util.h" 6#include "machine.h" 7#include "api/fs/fs.h" 8 9int arch__fix_module_text_start(u64 *start, const char *name) 10{ 11 char path[PATH_MAX]; 12 13 snprintf(path, PATH_MAX, "module/%.*s/sections/.text", 14 (int)strlen(name) - 2, name + 1); 15 16 if (sysfs__read_ull(path, (unsigned long long *)start) < 0) 17 return -1; 18 19 return 0; 20}