blob: 8c7bc8cccc1818dae1d647c73564d7edeebb0e8a (
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
|
#ifndef __ASM_SECTIONS_H
#define __ASM_SECTIONS_H
#ifndef __ASSEMBLY__
#include <asm-generic/sections.h>
/*
* Access a linker supplied variable. Use this if your code might not be running
* at the address it is linked at.
*/
#define ld_var(name) ({ \
unsigned long __ld_var_##name(void); \
__ld_var_##name(); \
})
#else
/*
* Access a linker supplied variable, assembler macro version
*/
.macro ld_var name, reg, scratch
1000:
ldr \reg, 1001f
ldr \scratch, =1000b
add \reg, \reg, \scratch
b 1002f
1001:
.word \name - 1000b
1002:
.endm
#endif
#endif /* __ASM_SECTIONS_H */
|