summaryrefslogtreecommitdiffstats
path: root/arch/riscv/include/asm/sections.h
blob: cea039cc5e1465483ecdb483e4e33510e55dab0a (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
/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef __ASM_SECTIONS_H
#define __ASM_SECTIONS_H

#ifndef __ASSEMBLY__
#include <asm-generic/sections.h>
#include <linux/types.h>
#include <asm/unaligned.h>
#include <asm/reloc.h>

extern char __rel_dyn_start[];
extern char __rel_dyn_end[];
extern char __dynsym_start[];
extern char __dynsym_end[];

extern char input_data[];
extern char input_data_end[];

unsigned long get_runtime_offset(void);

static inline unsigned int input_data_len(void)
{
	return get_unaligned((const u32 *)runtime_address(input_data_end) - 1);
}

#endif

#endif /* __ASM_SECTIONS_H */