<commit_before>#ifndef __CR_ASM_VDSO_H__
#define __CR_ASM_VDSO_H__

#include "asm/int.h"
#include "asm-generic/vdso.h"

/*
 * This is a minimal amount of symbols
 * we should support at the moment.
 */
#define VDSO_SYMBOL_MAX		4

#define ARCH_VDSO_SYMBOLS			\
	"__kernel_clock_getres",		\
	"__kernel_clock_gettime",		\
	"__kernel_gettimeofday",		\
	"__kernel_rt_sigreturn"

struct vdso_symtable;
extern int vdso_redirect_calls(unsigned long base_to,
			       unsigned long base_from,
			       struct vdso_symtable *to,
			       struct vdso_symtable *from);
extern void write_intraprocedure_branch(unsigned long to, unsigned long from);

#endif /* __CR_ASM_VDSO_H__ */
<commit_msg>aarch64/pie/util-vdso: workaround for vdso_symbols relocation<commit_after>#ifndef __CR_ASM_VDSO_H__
#define __CR_ASM_VDSO_H__

#include "asm/int.h"
#include "asm-generic/vdso.h"

/*
 * This is a minimal amount of symbols
 * we should support at the moment.
 */
#define VDSO_SYMBOL_MAX		4

/*
 * Workaround for VDSO array symbol table's relocation.
 * XXX: remove when compel/piegen will support aarch64.
 */
static const char* __maybe_unused aarch_vdso_symbol1 = "__kernel_clock_getres";
static const char* __maybe_unused aarch_vdso_symbol2 = "__kernel_clock_gettime";
static const char* __maybe_unused aarch_vdso_symbol3 = "__kernel_gettimeofday";
static const char* __maybe_unused aarch_vdso_symbol4 = "__kernel_rt_sigreturn";

#define ARCH_VDSO_SYMBOLS			\
	aarch_vdso_symbol1,			\
	aarch_vdso_symbol2,			\
	aarch_vdso_symbol3,			\
	aarch_vdso_symbol4


struct vdso_symtable;
extern int vdso_redirect_calls(unsigned long base_to,
			       unsigned long base_from,
			       struct vdso_symtable *to,
			       struct vdso_symtable *from);
extern void write_intraprocedure_branch(unsigned long to, unsigned long from);

#endif /* __CR_ASM_VDSO_H__ */

{'fraction_non_alphanumeric': 0.07780195865070728, 'fraction_numerical': 0.007616974972796518, 'mean_word_length': 4.693498452012384, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1349065', 'n_tokens_mistral': 713, 'n_tokens_neox': 687, 'n_words': 154}