blob: 65046ef159166c241a3be2eef75489862c10c43d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
/*
* Symbol helper for FMP
*
* Copyright (C) 2015 Samsung Electronics Co., Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <linux/kernel.h>
extern void first_fmp_text(void);
extern void first_fmp_init(void);
extern const int first_fmp_rodata;
extern void last_fmp_text(void);
extern const int last_fmp_rodata;
extern void last_fmp_init(void);
unsigned long get_fmp_symbol_address(const char *symname)
{
if (!strcmp(symname, "first_fmp_text"))
return (unsigned long)first_fmp_text;
else if (!strcmp(symname, "last_fmp_text"))
return (unsigned long)last_fmp_text;
else if (!strcmp(symname, "first_fmp_rodata"))
return (unsigned long)&first_fmp_rodata;
else if (!strcmp(symname, "last_fmp_rodata"))
return (unsigned long)&last_fmp_rodata;
else if (!strcmp(symname, "first_fmp_init"))
return (unsigned long)first_fmp_init;
else if (!strcmp(symname, "last_fmp_init"))
return (unsigned long)last_fmp_init;
return 0;
}
|